test / app.py
geeksiddhant's picture
Update app.py
fdefb29 verified
raw
history blame contribute delete
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()