proitm commited on
Commit
0f7002c
·
verified ·
1 Parent(s): 0ba1bbc

Added final status printout

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -145,7 +145,7 @@ async def run_and_submit_all(profile: gr.OAuthProfile | None):
145
  if not answers_payload:
146
  print("Agent did not produce any answers to submit.")
147
  return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
148
- return False
149
  # 4. Prepare Submission
150
  submission_data = {"username": username.strip(), "agent_code": agent_code, "answers": answers_payload}
151
  status_update = f"Agent finished. Submitting {len(answers_payload)} answers for user '{username}'..."
@@ -165,7 +165,7 @@ async def run_and_submit_all(profile: gr.OAuthProfile | None):
165
  f"({result_data.get('correct_count', '?')}/{result_data.get('total_attempted', '?')} correct)\n"
166
  f"Message: {result_data.get('message', 'No message received.')}"
167
  )
168
- print("Submission successful.")
169
  return final_status, pd.DataFrame(results_log)
170
  except aiohttp.ClientResponseError as e:
171
  error_detail = f"Server responded with status {e.status}."
 
145
  if not answers_payload:
146
  print("Agent did not produce any answers to submit.")
147
  return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
148
+
149
  # 4. Prepare Submission
150
  submission_data = {"username": username.strip(), "agent_code": agent_code, "answers": answers_payload}
151
  status_update = f"Agent finished. Submitting {len(answers_payload)} answers for user '{username}'..."
 
165
  f"({result_data.get('correct_count', '?')}/{result_data.get('total_attempted', '?')} correct)\n"
166
  f"Message: {result_data.get('message', 'No message received.')}"
167
  )
168
+ print("Submission successful.", final_status)
169
  return final_status, pd.DataFrame(results_log)
170
  except aiohttp.ClientResponseError as e:
171
  error_detail = f"Server responded with status {e.status}."