Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -124,7 +124,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 124 |
|
| 125 |
#3A
|
| 126 |
|
| 127 |
-
|
| 128 |
#--------------------------------------------------
|
| 129 |
answers_payload = []
|
| 130 |
for item in questions_data:
|
|
@@ -134,7 +134,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 134 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 135 |
continue
|
| 136 |
try:
|
| 137 |
-
answer =
|
| 138 |
answers_payload.append({"task_id": task_id, "submitted_answer": answer})
|
| 139 |
print(f"Answered Task {task_id}: {answer[:50]}...")
|
| 140 |
except Exception as e:
|
|
|
|
| 124 |
|
| 125 |
#3A
|
| 126 |
|
| 127 |
+
def run_all_questions(questions_data):
|
| 128 |
#--------------------------------------------------
|
| 129 |
answers_payload = []
|
| 130 |
for item in questions_data:
|
|
|
|
| 134 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 135 |
continue
|
| 136 |
try:
|
| 137 |
+
answer = agent.run(question_text) # await coroutine
|
| 138 |
answers_payload.append({"task_id": task_id, "submitted_answer": answer})
|
| 139 |
print(f"Answered Task {task_id}: {answer[:50]}...")
|
| 140 |
except Exception as e:
|