Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
import streamlit as st
|
2 |
-
from bardapi import Bard
|
3 |
-
import os
|
4 |
|
5 |
uri = os.environ["BARD_API_KEY"]
|
6 |
bard = Bard(token = uri)
|
7 |
|
|
|
8 |
def Chatbot():
|
9 |
st.title("Chatbot")
|
10 |
-
|
11 |
umsg = bard.get_answer(query)
|
12 |
|
13 |
-
with st.chat_message("
|
14 |
st.write(umsg["content"])
|
15 |
|
16 |
Chatbot()
|
17 |
-
|
18 |
|
|
|
1 |
import streamlit as st
|
2 |
+
from bardapi import Bard
|
3 |
+
import os
|
4 |
|
5 |
uri = os.environ["BARD_API_KEY"]
|
6 |
bard = Bard(token = uri)
|
7 |
|
8 |
+
|
9 |
def Chatbot():
|
10 |
st.title("Chatbot")
|
11 |
+
query := st.chat_input("enter your message")
|
12 |
umsg = bard.get_answer(query)
|
13 |
|
14 |
+
with st.chat_message("Assistant"):
|
15 |
st.write(umsg["content"])
|
16 |
|
17 |
Chatbot()
|
18 |
+
|
19 |
|