Toumaima commited on
Commit
317104f
·
verified ·
1 Parent(s): 8fc7a83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -204,11 +204,10 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
204
  try:
205
  submitted_answer = agent(question_text)
206
  print(submitted_answer)
207
- is_correct = question_scorer(submitted_answer, correct_answer) if correct_answer else "N/A"
208
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
209
- results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer,"isCorrect":is_correct})
210
  except Exception as e:
211
- results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}","isCorrect":"ERROR"})
212
 
213
  if not answers_payload:
214
  return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
 
204
  try:
205
  submitted_answer = agent(question_text)
206
  print(submitted_answer)
 
207
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
208
+ results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
209
  except Exception as e:
210
+ results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
211
 
212
  if not answers_payload:
213
  return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)