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