bstraehle commited on
Commit
dd9a7ec
1 Parent(s): 27f6019

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,10 +8,10 @@ lock = threading.Lock()
8
  LLM = "gpt-4o"
9
 
10
  def invoke(openai_api_key, task):
11
- if (openai_api_key == ""):
12
  raise gr.Error("OpenAI API Key is required.")
13
 
14
- if (task == ""):
15
  raise gr.Error("Task is required.")
16
 
17
  with lock:
 
8
  LLM = "gpt-4o"
9
 
10
  def invoke(openai_api_key, task):
11
+ if not openai_api_key:
12
  raise gr.Error("OpenAI API Key is required.")
13
 
14
+ if not task:
15
  raise gr.Error("Task is required.")
16
 
17
  with lock: