Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,8 +6,6 @@ from helper import get_questions
|
|
| 6 |
|
| 7 |
lock = threading.Lock()
|
| 8 |
|
| 9 |
-
MODEL_ID = "gpt-4o"
|
| 10 |
-
|
| 11 |
def invoke(level, question, file_name, ground_truth, openai_api_key):
|
| 12 |
if not question:
|
| 13 |
raise gr.Error("Question is required.")
|
|
@@ -17,7 +15,7 @@ def invoke(level, question, file_name, ground_truth, openai_api_key):
|
|
| 17 |
|
| 18 |
with lock:
|
| 19 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 20 |
-
result, matches_ground_truth = run_agent(
|
| 21 |
del os.environ["OPENAI_API_KEY"]
|
| 22 |
return result, matches_ground_truth
|
| 23 |
|
|
|
|
| 6 |
|
| 7 |
lock = threading.Lock()
|
| 8 |
|
|
|
|
|
|
|
| 9 |
def invoke(level, question, file_name, ground_truth, openai_api_key):
|
| 10 |
if not question:
|
| 11 |
raise gr.Error("Question is required.")
|
|
|
|
| 15 |
|
| 16 |
with lock:
|
| 17 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 18 |
+
result, matches_ground_truth = run_agent(level, question, file_name, ground_truth)
|
| 19 |
del os.environ["OPENAI_API_KEY"]
|
| 20 |
return result, matches_ground_truth
|
| 21 |
|