Update app.py
Browse files
app.py
CHANGED
@@ -9,9 +9,15 @@ LEVEL = 1
|
|
9 |
lock = threading.Lock()
|
10 |
|
11 |
def invoke(level, question, file_name, ground_truth, openai_api_key):
|
|
|
|
|
|
|
12 |
if not question:
|
13 |
raise gr.Error("Question is required.")
|
14 |
-
|
|
|
|
|
|
|
15 |
if not openai_api_key:
|
16 |
raise gr.Error("OpenAI API Key is required.")
|
17 |
|
|
|
9 |
lock = threading.Lock()
|
10 |
|
11 |
def invoke(level, question, file_name, ground_truth, openai_api_key):
|
12 |
+
if not level:
|
13 |
+
raise gr.Error("Level is required.")
|
14 |
+
|
15 |
if not question:
|
16 |
raise gr.Error("Question is required.")
|
17 |
+
|
18 |
+
if not ground_truth:
|
19 |
+
raise gr.Error("Ground Truth is required.")
|
20 |
+
|
21 |
if not openai_api_key:
|
22 |
raise gr.Error("OpenAI API Key is required.")
|
23 |
|