lethaq commited on
Commit
e58672b
·
verified ·
1 Parent(s): 70da919

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
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 list of dictionaries
289
- print(f"Submitting {len(answers_payload)} answers to: {submit_url}")
290
- try:
291
- # Important: Submit the answers_payload directly as JSON
292
- response = requests.post(submit_url, json=answers_payload, timeout=60)
293
- response.raise_for_status()
 
 
 
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"