Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -203,12 +203,13 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
203 |
for item in questions_data:
|
204 |
task_id = item.get("task_id")
|
205 |
question_text = item.get("question")
|
|
|
206 |
print(f"question: {question_text}")
|
207 |
if not task_id or question_text is None:
|
208 |
print(f"Skipping item with missing task_id or question: {item}")
|
209 |
continue
|
210 |
try:
|
211 |
-
submitted_answer = agent(question_text)
|
212 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
213 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
214 |
except Exception as e:
|
|
|
203 |
for item in questions_data:
|
204 |
task_id = item.get("task_id")
|
205 |
question_text = item.get("question")
|
206 |
+
question_file = item.get("file_name")
|
207 |
print(f"question: {question_text}")
|
208 |
if not task_id or question_text is None:
|
209 |
print(f"Skipping item with missing task_id or question: {item}")
|
210 |
continue
|
211 |
try:
|
212 |
+
submitted_answer = agent(input={"question": question_text, "file_name": question_file, "task_id": task_id})
|
213 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
214 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
215 |
except Exception as e:
|