Download app.py from agents-course/Final_Assignment_Template: direct link, hf CLI and curl.
- Browser
- Download file 368 Bytes
-
https://huggingface.co/spaces/agents-course/Final_Assignment_Template/resolve/refs%2Fpr%2F420/app.py
- Command line
-
hf download hf://spaces/agents-course/Final_Assignment_Template@refs/pr/420/app.py
-
curl -L -o app.py https://huggingface.co/spaces/agents-course/Final_Assignment_Template/resolve/refs%2Fpr%2F420/app.py
368 Bytes
| 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 | |
| ) |