XeroDN commited on
Commit
f71f6af
·
verified ·
1 Parent(s): 9841469

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -1,17 +1,17 @@
1
  import gradio as gr
2
- from agent_code import agent
3
 
4
- def ask_question(q):
5
- state = {
6
- "question": q,
7
- "thoughts": [],
8
- "tool_results": [],
9
- "answer": None
10
- }
11
- result = agent.invoke(state)
12
- return result["answer"]
13
 
14
- gr.Interface(fn=ask_question,
15
- inputs=gr.Textbox(label="Ask a question"),
16
- outputs="text",
17
- title="GIAI LangGraph Agent").launch()
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ from submit_gaia import run_submission # This is the function that does the whole GAIA submission
3
 
4
+ def on_submit_click():
5
+ result = run_submission() # Run the big GAIA submission
6
+ return f"Leaderboard submission result:\n{result}"
 
 
 
 
 
 
7
 
8
+ with gr.Blocks() as demo:
9
+ gr.Markdown("# GIAI LangGraph Agent Demo")
10
+
11
+ submit_button = gr.Button("Submit All GAIA Level 1 Questions")
12
+ output = gr.Textbox(label="Submission Result", lines=10)
13
+
14
+ # When the button is clicked, call on_submit_click, show output in textbox
15
+ submit_button.click(fn=on_submit_click, inputs=[], outputs=[output])
16
+
17
+ demo.launch()