Spaces:
Sleeping
Sleeping
import streamlit as st | |
from bardapi import Bard | |
import os | |
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() | |