Spaces:
Running
Running
Daniel Amendoeira
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -92,13 +92,13 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
92 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
93 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
94 |
|
95 |
-
# wait 10 seconds between calls to avoid API rate limit
|
96 |
-
print('\n\n-> Waiting 10 seconds to avoid API rate limit')
|
97 |
-
sleep(10)
|
98 |
-
|
99 |
except Exception as e:
|
100 |
print(f"Error running agent on task {task_id}: {e}")
|
101 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
|
|
|
|
|
|
|
|
102 |
|
103 |
if not answers_payload:
|
104 |
print("Agent did not produce any answers to submit.")
|
|
|
92 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
93 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
94 |
|
|
|
|
|
|
|
|
|
95 |
except Exception as e:
|
96 |
print(f"Error running agent on task {task_id}: {e}")
|
97 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
98 |
+
|
99 |
+
# wait 10 seconds between calls to avoid API rate limit
|
100 |
+
print('\n\n-> Waiting 10 seconds to avoid API rate limit')
|
101 |
+
sleep(10)
|
102 |
|
103 |
if not answers_payload:
|
104 |
print("Agent did not produce any answers to submit.")
|