from transformers import pipeline import gradio as gr from transformers.pipelines.conversational import Conversation conversational_pipeline = pipeline('conversational') def ama_func(x): conversation = Conversation(x) return conversational_pipeline(conversation) demo = gr.Interface( fn = ama_func, inputs = gr.Textbox(label="Hey, Bakayaro I'm the salty conversation bot 🤨", placeholder = 'Enter your question here....', lines = 3), outputs = 'text', ) demo.launch()