Test / app.py
Ankush05's picture
Update app.py
26bc5a4
raw
history blame
488 Bytes
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()