dygoo commited on
Commit
39c4bb7
·
verified ·
1 Parent(s): 2007a57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -377,8 +377,8 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
377
  submitted_answer = agent(question_text)
378
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
379
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
380
- if idx % 5 == 0 and idx > 0: # Added: Add delay every 5 questions
381
- time.sleep(1) # Wait 1 second between batches to avoid rate limiting
382
  except Exception as e:
383
  print(f"Error running agent on task {task_id}: {e}")
384
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
 
377
  submitted_answer = agent(question_text)
378
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
379
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
380
+ if idx % 1 == 0 and idx > 0:
381
+ time.sleep(10)
382
  except Exception as e:
383
  print(f"Error running agent on task {task_id}: {e}")
384
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})