Sumit123x's picture
Update app.py
9a9419d verified
raw
history blame contribute delete
461 Bytes
import gradio as gr
from transformers import pipeline, Conversation
# Load small BlenderBot model
chatbot = pipeline("conversational", model="facebook/blenderbot_small-90M")
def chat(message, history=[]):
conversation = Conversation(message)
chatbot(conversation)
response = conversation.generated_responses[-1]
return response
with gr.Blocks() as demo:
gr.Markdown("## 🤖 Sumit AI Chatbot")
gr.ChatInterface(fn=chat)
demo.launch()