innafomina commited on
Commit
fa83b52
·
1 Parent(s): b23dd30

added more delay

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -131,14 +131,13 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
131
  continue
132
  try:
133
  submitted_answer = agent(question_text)
134
- print(submitted_answer)
135
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
136
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
137
  except Exception as e:
138
  print(f"Error running agent on task {task_id}: {e}")
139
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
140
- if req_num % 2 == 0:
141
- time.sleep(30)
142
 
143
  if not answers_payload:
144
  print("Agent did not produce any answers to submit.")
 
131
  continue
132
  try:
133
  submitted_answer = agent(question_text)
 
134
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
135
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
136
  except Exception as e:
137
  print(f"Error running agent on task {task_id}: {e}")
138
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
139
+ time.sleep(30)
140
+ print('Number of answered questions:', len(results_log))
141
 
142
  if not answers_payload:
143
  print("Agent did not produce any answers to submit.")