Update app.py
Browse files
app.py
CHANGED
@@ -29,9 +29,9 @@ class BasicAgent:
|
|
29 |
answer = await self.gaia_agent.solve_gaia_question(question_data)
|
30 |
return str(answer)
|
31 |
except Exception as e:
|
32 |
-
return e
|
33 |
|
34 |
-
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
35 |
"""
|
36 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|
37 |
and displays the results.
|
@@ -92,7 +92,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
92 |
print(f"Skipping item with missing task_id or question: {item}")
|
93 |
continue
|
94 |
try:
|
95 |
-
submitted_answer = agent(question_text)
|
96 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
97 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
98 |
except Exception as e:
|
|
|
29 |
answer = await self.gaia_agent.solve_gaia_question(question_data)
|
30 |
return str(answer)
|
31 |
except Exception as e:
|
32 |
+
return e
|
33 |
|
34 |
+
async def run_and_submit_all( profile: gr.OAuthProfile | None):
|
35 |
"""
|
36 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|
37 |
and displays the results.
|
|
|
92 |
print(f"Skipping item with missing task_id or question: {item}")
|
93 |
continue
|
94 |
try:
|
95 |
+
submitted_answer = await agent(question_text)
|
96 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
97 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
98 |
except Exception as e:
|