iQuentin commited on
Commit
8318c5d
·
verified ·
1 Parent(s): 7f0b8bd

Setting saving archive better

Browse files
Files changed (1) hide show
  1. simuGAIA.py +7 -0
simuGAIA.py CHANGED
@@ -256,6 +256,13 @@ def run_simuGAIA_all( profile: gr.OAuthProfile | None, submit: Optional[bool] =
256
 
257
  # Save answer, task_id, and question_text to already_answered.json
258
  manager.add_answer(task_id, question_text, submitted_answer)
 
 
 
 
 
 
 
259
 
260
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
261
  else:
 
256
 
257
  # Save answer, task_id, and question_text to already_answered.json
258
  manager.add_answer(task_id, question_text, submitted_answer)
259
+ success = manager.add_answer(
260
+ task_id=task_id,
261
+ question=question_text,
262
+ submitted_answer=submitted_answer
263
+ )
264
+ if not success:
265
+ print("Error saving answer to archive.")
266
 
267
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
268
  else: