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