Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,10 +8,10 @@ lock = threading.Lock()
|
|
8 |
LLM = "gpt-4o"
|
9 |
|
10 |
def invoke(openai_api_key, task):
|
11 |
-
if
|
12 |
raise gr.Error("OpenAI API Key is required.")
|
13 |
|
14 |
-
if
|
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:
|