RCaz commited on
Commit
63228dd
·
verified ·
1 Parent(s): 9d6412f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -84,18 +84,15 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
84
  # We add to counter the token rate limit usage by openai of 30000 TPM
85
  time.sleep(10)
86
  # end insertion
87
- try:
88
- submitted_answer = agent(question_text)
89
- answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
90
- results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
91
- except Exception as e:
92
- answers_payload.append({"task_id": task_id, "submitted_answer": str(submitted_answer)})
93
- results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": str(submitted_answer)})
94
-
95
  except Exception as e:
96
- print(f"Error running agent on task {task_id}: {e}")
 
97
  # we limit the error message lentgh so we can still submit the other answers
98
- results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: "})
99
  # end insertion
100
 
101
  if not answers_payload:
 
84
  # We add to counter the token rate limit usage by openai of 30000 TPM
85
  time.sleep(10)
86
  # end insertion
87
+ submitted_answer = agent(question_text)
88
+ answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
89
+ results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
90
+
 
 
 
 
91
  except Exception as e:
92
+ print(f"Error running agent on task {task_id}: {e}")
93
+ answers_payload.append({"task_id": task_id, "submitted_answer": str(submitted_answer)})
94
  # we limit the error message lentgh so we can still submit the other answers
95
+ results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR:{e} "})
96
  # end insertion
97
 
98
  if not answers_payload: