Spaces:
Sleeping
Sleeping
test
Browse files
app.py
CHANGED
|
@@ -114,10 +114,22 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 114 |
print(f"Error running agent on task {task_id}: {e}")
|
| 115 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
| 116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
if not answers_payload:
|
| 118 |
print("Agent did not produce any answers to submit.")
|
| 119 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|
| 120 |
-
|
| 121 |
# 4. Prepare Submission
|
| 122 |
submission_data = {"username": username.strip(), "agent_code": agent_code, "answers": answers_payload}
|
| 123 |
status_update = f"Agent finished. Submitting {len(answers_payload)} answers for user '{username}'..."
|
|
|
|
| 114 |
print(f"Error running agent on task {task_id}: {e}")
|
| 115 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
| 116 |
|
| 117 |
+
final_status = (
|
| 118 |
+
f"Submission Successful!\n"
|
| 119 |
+
f"User: TEST\n"
|
| 120 |
+
f"Overall Score: 'N/A'"
|
| 121 |
+
f"0"
|
| 122 |
+
f"Message: 0"
|
| 123 |
+
)
|
| 124 |
+
|
| 125 |
+
results_df = pd.DataFrame(results_log)
|
| 126 |
+
return final_status, results_df
|
| 127 |
+
|
| 128 |
+
"""
|
| 129 |
if not answers_payload:
|
| 130 |
print("Agent did not produce any answers to submit.")
|
| 131 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|
| 132 |
+
|
| 133 |
# 4. Prepare Submission
|
| 134 |
submission_data = {"username": username.strip(), "agent_code": agent_code, "answers": answers_payload}
|
| 135 |
status_update = f"Agent finished. Submitting {len(answers_payload)} answers for user '{username}'..."
|