Spaces:
Running
Running
Daniel Amendoeira
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -92,9 +92,9 @@ 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 |
-
|
96 |
-
|
97 |
-
|
98 |
|
99 |
except Exception as e:
|
100 |
print(f"Error running agent on task {task_id}: {e}")
|
|
|
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}")
|