Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -88,11 +88,11 @@ async def smart_agent(questions_data: List[Dict[str, Any]]) -> List[Dict[str, An
|
|
| 88 |
print(f"Error on Task {task_id}: {e}")
|
| 89 |
return {"task_id": task_id, "submitted_answer": f"AGENT ERROR: {e}"}
|
| 90 |
|
| 91 |
-
|
| 92 |
-
|
| 93 |
|
| 94 |
-
|
| 95 |
-
|
| 96 |
|
| 97 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
| 98 |
"""
|
|
|
|
| 88 |
print(f"Error on Task {task_id}: {e}")
|
| 89 |
return {"task_id": task_id, "submitted_answer": f"AGENT ERROR: {e}"}
|
| 90 |
|
| 91 |
+
tasks = [process_question(item) for item in questions_data]
|
| 92 |
+
answers_payload = await asyncio.gather(*tasks)
|
| 93 |
|
| 94 |
+
print("✅ All tasks completed.")
|
| 95 |
+
return answers_payload
|
| 96 |
|
| 97 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
| 98 |
"""
|