kshitijthakkar commited on
Commit
4c8870a
·
verified ·
1 Parent(s): 2dac529

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -87,11 +87,12 @@ class GaiaAgent:
87
  return "ERROR: Agent failed to answer." # Return a string, not an exception
88
 
89
 
90
- def run_and_submit_all(profile: gr.OAuthProfile | None, openai_key: str):
91
  # --- Login & Setup ---
92
- if not profile:
93
- return "Please log in to Hugging Face to submit your score.", None
94
- username = profile.username.strip()
 
95
  # 1) Instantiate our improved agent
96
  try:
97
  agent = GaiaAgent(openai_key)
@@ -197,7 +198,7 @@ with gr.Blocks() as demo: # Corrected to use gr.Blocks()
197
  run_test_btn = gr.Button("Run Test Questions")
198
  test_results_output = gr.DataFrame(label="Test Results")
199
 
200
- run_btn.click(fn=run_and_submit_all, inputs=[login, key_in], outputs=[out_status, out_table])
201
  run_test_btn.click(
202
  fn=run_test_questions,
203
  inputs=[login, key_in, test_questions_input],
 
87
  return "ERROR: Agent failed to answer." # Return a string, not an exception
88
 
89
 
90
+ def run_and_submit_all(openai_key: str):
91
  # --- Login & Setup ---
92
+ # if not profile:
93
+ # return "Please log in to Hugging Face to submit your score.", None
94
+ # username = profile.username.strip()
95
+ username = "anonymous"
96
  # 1) Instantiate our improved agent
97
  try:
98
  agent = GaiaAgent(openai_key)
 
198
  run_test_btn = gr.Button("Run Test Questions")
199
  test_results_output = gr.DataFrame(label="Test Results")
200
 
201
+ run_btn.click(fn=run_and_submit_all, inputs=[key_in], outputs=[out_status, out_table])
202
  run_test_btn.click(
203
  fn=run_test_questions,
204
  inputs=[login, key_in, test_questions_input],