jcleee commited on
Commit
21eddb8
·
verified ·
1 Parent(s): c69ee23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -1,6 +1,17 @@
 
1
  from agent import get_agent
2
- from Gradio_UI import GradioUI
3
 
4
- if __name__ == "__main__":
5
- agent = get_agent()
6
- GradioUI(agent).launch()
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
  from agent import get_agent
3
+ import gradio as gr
4
 
5
+ # Load your working agent
6
+ agent = get_agent()
7
+
8
+ # Minimal endpoint that returns just the final answer as a string
9
+ def run_agent(question):
10
+ result = agent(question)
11
+ return str(result).strip() # Ensure it's clean and compatible with the eval system
12
+
13
+ # Define a simple Gradio interface that takes text and returns text
14
+ demo = gr.Interface(fn=run_agent, inputs="text", outputs="text")
15
+
16
+ # Launch the API-style interface (no chat, no UI bells/whistles)
17
+ demo.launch()