Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -285,12 +285,15 @@ def run_and_submit_all():
|
|
| 285 |
print("Agent did not produce any answers to submit.")
|
| 286 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|
| 287 |
|
| 288 |
-
# 4. Submit answers directly as a
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
# Important: Submit the answers_payload
|
| 292 |
-
|
| 293 |
-
|
|
|
|
|
|
|
|
|
|
| 294 |
result_data = response.json()
|
| 295 |
final_status = (
|
| 296 |
f"Submission Successful!\n"
|
|
|
|
| 285 |
print("Agent did not produce any answers to submit.")
|
| 286 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|
| 287 |
|
| 288 |
+
# 4. Submit answers directly as a dictionary with answers list
|
| 289 |
+
print(f"Submitting {len(answers_payload)} answers to: {submit_url}")
|
| 290 |
+
try:
|
| 291 |
+
# Important: Submit the answers_payload as a dictionary with answers key
|
| 292 |
+
submission_dict = {"answers": answers_payload}
|
| 293 |
+
response = requests.post(submit_url, json=submission_dict, timeout=60)
|
| 294 |
+
response.raise_for_status()
|
| 295 |
+
# ...其余代码...
|
| 296 |
+
|
| 297 |
result_data = response.json()
|
| 298 |
final_status = (
|
| 299 |
f"Submission Successful!\n"
|