Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,11 +24,11 @@ logging.basicConfig(stream = sys.stdout, level = logging.DEBUG)
|
|
24 |
logging.getLogger().addHandler(logging.StreamHandler(stream = sys.stdout))
|
25 |
|
26 |
def invoke(openai_api_key, prompt, agent_option):
|
27 |
-
if
|
28 |
raise gr.Error("OpenAI API Key is required.")
|
29 |
-
if
|
30 |
raise gr.Error("Prompt is required.")
|
31 |
-
if
|
32 |
raise gr.Error("Use Agent is required.")
|
33 |
|
34 |
with lock:
|
|
|
24 |
logging.getLogger().addHandler(logging.StreamHandler(stream = sys.stdout))
|
25 |
|
26 |
def invoke(openai_api_key, prompt, agent_option):
|
27 |
+
if not openai_api_key:
|
28 |
raise gr.Error("OpenAI API Key is required.")
|
29 |
+
if not prompt:
|
30 |
raise gr.Error("Prompt is required.")
|
31 |
+
if not agent_option:
|
32 |
raise gr.Error("Use Agent is required.")
|
33 |
|
34 |
with lock:
|