Daniel Amendoeira commited on
Commit
39067d9
·
verified ·
1 Parent(s): 0c0f360

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- # 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.")
 
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.")