Download app.py from gpcorser/huggingface01: direct link, hf CLI and curl.
- Browser
- Download file 292 Bytes
-
https://huggingface.co/gpcorser/huggingface01/resolve/main/app.py
- Command line
-
hf download hf://gpcorser/huggingface01/app.py
-
curl -L -o app.py https://huggingface.co/gpcorser/huggingface01/resolve/main/app.py
292 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| chatbot = pipeline("text2text-generation", model="your-username/my-ai-agent") | |
| def chat(user_input): | |
| return chatbot(user_input)[0]['generated_text'] | |
| gr.Interface(fn=chat, inputs="text", outputs="text", title="My AI Agent").launch() | |