Spaces:
No application file
No application file
Update app.py
Browse files
app.py
CHANGED
|
@@ -424,7 +424,7 @@ def api_submit_answers(processed_answers: List[Dict[str, Any]], username: str) -
|
|
| 424 |
submission_data = {
|
| 425 |
"username": username,
|
| 426 |
"agent_code": AGENT_CODE_IDENTIFIER,
|
| 427 |
-
"answers": processed_answers
|
| 428 |
}
|
| 429 |
|
| 430 |
print("\n=== Submission Details ===")
|
|
@@ -477,12 +477,14 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 477 |
print(f"\nProcessing question: {question_text}")
|
| 478 |
answer = asyncio.run(agent.process_question(question_text))
|
| 479 |
|
|
|
|
| 480 |
answers_payload.append({
|
| 481 |
"task_id": task_id,
|
| 482 |
-
"
|
| 483 |
-
|
| 484 |
})
|
| 485 |
|
|
|
|
| 486 |
results_log.append({
|
| 487 |
"Task ID": task_id,
|
| 488 |
"Question": question_text,
|
|
|
|
| 424 |
submission_data = {
|
| 425 |
"username": username,
|
| 426 |
"agent_code": AGENT_CODE_IDENTIFIER,
|
| 427 |
+
"answers": processed_answers # Now in correct format: {"task_id": "...", "model_answer": "..."}
|
| 428 |
}
|
| 429 |
|
| 430 |
print("\n=== Submission Details ===")
|
|
|
|
| 477 |
print(f"\nProcessing question: {question_text}")
|
| 478 |
answer = asyncio.run(agent.process_question(question_text))
|
| 479 |
|
| 480 |
+
# Format answer in required JSONL format
|
| 481 |
answers_payload.append({
|
| 482 |
"task_id": task_id,
|
| 483 |
+
"model_answer": answer.text
|
| 484 |
+
# Removed reasoning_trace as it's optional
|
| 485 |
})
|
| 486 |
|
| 487 |
+
# Keep detailed logs for display only
|
| 488 |
results_log.append({
|
| 489 |
"Task ID": task_id,
|
| 490 |
"Question": question_text,
|