from bardapi import Bard | |
import os | |
import streamlit as st | |
bardkey = os.environ.get("BARD_API_KEY") | |
bard = Bard(session=bardkey) | |
if query := st.chat_input("Hi, how can I help you"): | |
ans = bard.get_answer(query) | |
with st.chat_message("assistant"): | |
st.write(ans['content']) | |