ChatBot / app.py
Ankush05's picture
Update app.py
1c5a2c6
raw
history blame
480 Bytes
import streamlit as st
import os
from transformers import pipeline
from bardapi import Bard
import os
bardkey = os.environ.get("BARD_API_KEY")
bard = Bard(token=bardkey)
# convo = pipeline("conversational")
def chatbot():
st.title("ChatBot")
if message := st.chat_input("Enter your message"):
umsg = bard.get_answer(message)["content"]
with st.chat_message("assistant"):
st.write(umsg)
chatbot()