Spaces:
Runtime error
Runtime error
Download app.py from geeksiddhant/test: direct link, hf CLI and curl.
- Browser
- Download file 396 Bytes
-
https://huggingface.co/spaces/geeksiddhant/test/resolve/main/app.py
- Command line
-
hf download hf://spaces/geeksiddhant/test/app.py
-
curl -L -o app.py https://huggingface.co/spaces/geeksiddhant/test/resolve/main/app.py
396 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| chatbot = pipeline("conversational", model="microsoft/DialoGPT-medium") | |
| def chatbot_response(user_input): | |
| response = chatbot(user_input) | |
| return response[0]["generated_text"] | |
| iface = gr.Interface( | |
| fn=chatbot_response, | |
| inputs=gr.inputs.Textbox(lines=2, placeholder="Type a message..."), | |
| outputs="text" | |
| ) | |
| iface.launch() |