File size: 376 Bytes
4de6624
 
 
 
 
 
 
 
 
 
 
 
5d1de09
4de6624
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()