Spaces:
Runtime error
Runtime error
| 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() |