Spaces:
Running
Running
Daniel Amendoeira
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -96,9 +96,10 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
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 |
-
|
100 |
-
|
101 |
-
|
|
|
102 |
|
103 |
if not answers_payload:
|
104 |
print("Agent did not produce any answers to submit.")
|
|
|
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 |
+
finally:
|
100 |
+
# wait 10 seconds between calls to avoid API rate limit
|
101 |
+
print('\n\n-> Waiting 10 seconds to avoid API rate limit')
|
102 |
+
sleep(10)
|
103 |
|
104 |
if not answers_payload:
|
105 |
print("Agent did not produce any answers to submit.")
|