Sborole commited on
Commit
79a6d71
·
verified ·
1 Parent(s): 72da03d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -65,7 +65,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
65
  file_name = item.get("file_name")
66
 
67
  file_path = ""
68
-
69
  if file_name:
70
  file_path = os.path.join(files_base, file_name)
71
 
@@ -81,7 +81,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
81
  print(f"Skipping item with missing task_id or question: {item}")
82
  continue
83
  try:
84
- submitted_answer = agent(question_text, file_path=file_path)
85
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
86
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
87
  except Exception as e:
 
65
  file_name = item.get("file_name")
66
 
67
  file_path = ""
68
+ file_content = None
69
  if file_name:
70
  file_path = os.path.join(files_base, file_name)
71
 
 
81
  print(f"Skipping item with missing task_id or question: {item}")
82
  continue
83
  try:
84
+ submitted_answer = agent(question_text, file_content=file_content)
85
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
86
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
87
  except Exception as e: