Psiska commited on
Commit
81105ee
·
1 Parent(s): b4f9d22
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -71,21 +71,21 @@ def run_and_submit_all(profile: gr.OAuthProfile | None = None):
71
  return f"❌ Submission failed: {e}", pd.DataFrame(results_log)
72
 
73
  # Interface
74
- with gr.Blocks() as demo:
75
- gr.Markdown("# 🤖 GAIA Agent Submission")
76
- gr.Markdown(
77
- "Click the button below to run your agent on the benchmark and submit your answers."
78
- )
79
-
80
- run_button = gr.Button("Run Evaluation & Submit")
81
- status_box = gr.Textbox(label="Status", lines=6, interactive=False)
82
- results_table = gr.DataFrame(label="Answers Submitted")
83
-
84
- run_button.click(
85
- fn=run_and_submit_all,
86
- inputs=[], # Gradio auto-injects profile
87
- outputs=[status_box, results_table]
88
- )
89
 
90
  if __name__ == "__main__":
91
  demo.launch()
 
71
  return f"❌ Submission failed: {e}", pd.DataFrame(results_log)
72
 
73
  # Interface
74
+ import gradio as gr
75
+
76
+ iface = gr.Interface(
77
+ fn=run_and_submit_all,
78
+ inputs=[], # OAuthProfile is automatically injected in Spaces
79
+ outputs=[
80
+ gr.Textbox(label="Status"),
81
+ gr.DataFrame(label="Answers Submitted")
82
+ ],
83
+ live=False
84
+ )
85
+
86
+ if __name__ == "__main__":
87
+ iface.launch()
88
+
89
 
90
  if __name__ == "__main__":
91
  demo.launch()