import gradio as gr | |
from transformers import pipeline | |
chatbot = pipeline("conversational", model="microsoft/DialoGPT-medium") | |
def chat_with_bot(message): | |
return chatbot(message)[0]['generated_text'] | |
gr.Interface(fn=chat_with_bot, inputs="text", outputs="text").launch() | |