From a0e2621853a48d66c3b83a5e367f70471fd2207f Mon Sep 17 00:00:00 2001 From: sean1832 Date: Sun, 26 Mar 2023 19:48:37 +1100 Subject: [PATCH] fix: empty api key is allowed to run --- src/SumGPT.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SumGPT.py b/src/SumGPT.py index 8a55521..bdc334e 100644 --- a/src/SumGPT.py +++ b/src/SumGPT.py @@ -94,8 +94,9 @@ if st.button("🚀 Run", disabled=exceeded): start_time = time.time() st.cache_data.clear() + util.clear_cache('summary') API_KEY = st.session_state['OPENAI_API_KEY'] - if not API_KEY and GPT.misc.validate_api_key(API_KEY): + if not API_KEY and not GPT.misc.validate_api_key(API_KEY): st.error("❌ Please enter a valid [OpenAI API key](https://beta.openai.com/account/api-keys).") else: with st.spinner("Summarizing... (this might take a while)"):