ChatBot / app.py
Ankush05's picture
this
0c9f179
raw
history blame
401 Bytes
import streamlit as st
import os
from transformers import pipeline, Conversation
convo = pipeline("conversational")
def chatbot():
st.title("ChatBot")
if message := st.chat_input("Enter your message"):
umsg = Conversation(message)
answer = convo(umsg)
with st.chat_message("assistant"):
st.write(answer)
chatbot()