demo_chat_bot / app.py
dan237's picture
Update app.py
ac5b175 verified
raw
history blame contribute delete
372 Bytes
from transformers import pipeline
import gradio as gr
chatbot = pipeline(model="facebook/blenderbot-400M-distill")
def gradio_chat(message, history):
conversation = chatbot(message)
return conversation[0]['generated_text']
chatbot_app = gr.ChatInterface(gradio_chat, title="Chatbot", description="Enter text to start chatting.")
chatbot_app.launch(debug=True)