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() |