from transformers import pipeline, Conversation import gradio as gr chatbot = pipeline(task="conversational",model="facebook/blenderbot-400M-distill") def launch(msg): conversation = Conversation(msg) conversation = chatbot(conversation) return conversation iface = gr.Interface(launch, inputs= gr.Textbox(),outputs="text") iface.launch()