Spaces:
Sleeping
Sleeping
| # app.py | |
| from agent import get_agent | |
| import gradio as gr | |
| # Load your working agent | |
| agent = get_agent() | |
| # Minimal endpoint that returns just the final answer as a string | |
| def run_agent(question): | |
| result = agent(question) | |
| return str(result).strip() # Ensure it's clean and compatible with the eval system | |
| # Define a simple Gradio interface that takes text and returns text | |
| demo = gr.Interface(fn=run_agent, inputs="text", outputs="text") | |
| # Launch the API-style interface (no chat, no UI bells/whistles) | |
| demo.launch() | |