File size: 292 Bytes
426f640
 
 
 
 
 
 
2da3872
426f640
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
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'])