import streamlit as st import os from bardapi import Bard from pymongo import Mongoclient url = os.environ["MONGO_CONNECTION_STRING"] client = MongoClient(url,tlsCerificateKeyFile =") uri = os.environ["BARD_API_KEY"] bard = Bard(token = uri ) def Chatbot(): st.title("chatbot") if query:= st.chat_input("Enter your message"): umsg = bard.get_answer(query) with st.chat_message("assistant"): st.write(umsg["content"]) Chatbot()