Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -146,7 +146,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 146 |
continue
|
| 147 |
try:
|
| 148 |
#answer = await agent.run(question_text) # await coroutine
|
| 149 |
-
answer =
|
| 150 |
answers_payload.append({"task_id": task_id, "submitted_answer": answer})
|
| 151 |
print(f"Answered Task {task_id}: {answer[:50]}...")
|
| 152 |
except Exception as e:
|
|
@@ -154,8 +154,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 154 |
print(f"Error on Task {task_id}: {e}")
|
| 155 |
return answers_payload
|
| 156 |
|
| 157 |
-
|
| 158 |
-
answers_payload = run_all_questions(questions_data)
|
| 159 |
|
| 160 |
#3B
|
| 161 |
|
|
|
|
| 146 |
continue
|
| 147 |
try:
|
| 148 |
#answer = await agent.run(question_text) # await coroutine
|
| 149 |
+
answer = agent.run(question_text) # await coroutine
|
| 150 |
answers_payload.append({"task_id": task_id, "submitted_answer": answer})
|
| 151 |
print(f"Answered Task {task_id}: {answer[:50]}...")
|
| 152 |
except Exception as e:
|
|
|
|
| 154 |
print(f"Error on Task {task_id}: {e}")
|
| 155 |
return answers_payload
|
| 156 |
|
| 157 |
+
answers_payload = asyncio.run(run_all_questions(questions_data))
|
|
|
|
| 158 |
|
| 159 |
#3B
|
| 160 |
|