Spaces:
Runtime error
Runtime error
File size: 396 Bytes
c6a4903 fdefb29 c6a4903 fdefb29 c6a4903 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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() |