ChatBot / app.py
Ankush05's picture
Update app.py
6ecd566
raw
history blame
377 Bytes
import streamlit as st
import os
from transformers import pipeline, Conversation
convo = pipeline(model="facebook/blenderbot-400M-distill")
def chatbot():
st.title("ChatBot")
if message := st.chat_input("Enter your query"):
umsg = Conversation(message)
answer = convo(umsg)
with st.chat_message("Assistant"):
st.write(answer)