CosmoAI commited on
Commit
426f640
·
1 Parent(s): bb57c31

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from bardapi import Bard
2
+ import os
3
+ import streamlit as st
4
+
5
+ bardkey = os.environ.get("BARD_API_KEY")
6
+
7
+ bard = Bard(session=bardkey)
8
+ if query = st.chat_input("Hi, how can I help you"):
9
+ ans = bard.get_answer(query)
10
+ with st.chat_message("assistant"):
11
+ st.write(ans['content'])
12
+