| import gradio as gr | |
| from agent import agent | |
| def run(task): | |
| return agent(task) | |
| demo = gr.Interface( | |
| fn=run, | |
| inputs=gr.Textbox(label="Ask a question"), | |
| outputs=gr.Textbox(label="Answer"), | |
| title="Simple HF Agent", | |
| description="Stable baseline agent (no router, no smolagents)" | |
| ) | |
| demo.launch( | |
| server_name="0.0.0.0", | |
| server_port=7860 | |
| ) |