Spaces:
Runtime error

chat_abc / app.py
magkey's picture
Create app.py
d345e26
Raw History Blame Contribute Delete
449 Bytes
from transformers import pipeline, Conversation
import gradio as gr
chatbot = pipeline(model="microsoft/DialoGPT-medium")
def chat(input_text):
conversation = Conversation(input_text)
conversation = chatbot(conversation)
return conversation.generated_responses[-1]
iface = gr.Interface(fn=chat,
inputs=gr.inputs.Textbox(lines=2, placeholder="Type here..."),
outputs="text")
iface.launch()