Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,13 +9,13 @@ LLM = "gpt-4o"
|
|
| 9 |
|
| 10 |
FILE_PATH = "https://huggingface.co/datasets/gaia-benchmark/GAIA/blob/main/2023/validation/"
|
| 11 |
|
| 12 |
-
def invoke(
|
|
|
|
|
|
|
|
|
|
| 13 |
if not openai_api_key:
|
| 14 |
raise gr.Error("OpenAI API Key is required.")
|
| 15 |
|
| 16 |
-
if not task:
|
| 17 |
-
raise gr.Error("Task is required.")
|
| 18 |
-
|
| 19 |
with lock:
|
| 20 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 21 |
result = run_agent(LLM, task)
|
|
|
|
| 9 |
|
| 10 |
FILE_PATH = "https://huggingface.co/datasets/gaia-benchmark/GAIA/blob/main/2023/validation/"
|
| 11 |
|
| 12 |
+
def invoke(level, question, file_name, ground_truth, openai_api_key):
|
| 13 |
+
if not question:
|
| 14 |
+
raise gr.Error("Question is required.")
|
| 15 |
+
|
| 16 |
if not openai_api_key:
|
| 17 |
raise gr.Error("OpenAI API Key is required.")
|
| 18 |
|
|
|
|
|
|
|
|
|
|
| 19 |
with lock:
|
| 20 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 21 |
result = run_agent(LLM, task)
|