Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -84,18 +84,15 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 84 |
# We add to counter the token rate limit usage by openai of 30000 TPM
|
| 85 |
time.sleep(10)
|
| 86 |
# end insertion
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
except Exception as e:
|
| 92 |
-
answers_payload.append({"task_id": task_id, "submitted_answer": str(submitted_answer)})
|
| 93 |
-
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": str(submitted_answer)})
|
| 94 |
-
|
| 95 |
except Exception as e:
|
| 96 |
-
|
|
|
|
| 97 |
# we limit the error message lentgh so we can still submit the other answers
|
| 98 |
-
|
| 99 |
# end insertion
|
| 100 |
|
| 101 |
if not answers_payload:
|
|
|
|
| 84 |
# We add to counter the token rate limit usage by openai of 30000 TPM
|
| 85 |
time.sleep(10)
|
| 86 |
# end insertion
|
| 87 |
+
submitted_answer = agent(question_text)
|
| 88 |
+
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
| 89 |
+
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
| 90 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
except Exception as e:
|
| 92 |
+
print(f"Error running agent on task {task_id}: {e}")
|
| 93 |
+
answers_payload.append({"task_id": task_id, "submitted_answer": str(submitted_answer)})
|
| 94 |
# we limit the error message lentgh so we can still submit the other answers
|
| 95 |
+
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR:{e} "})
|
| 96 |
# end insertion
|
| 97 |
|
| 98 |
if not answers_payload:
|