Spaces:
Sleeping
Sleeping
LordFarquaad42
commited on
Commit
•
0c9973b
1
Parent(s):
7f8f7cd
added button
Browse files
app.py
CHANGED
@@ -19,14 +19,15 @@ st.write("Data Avaliable: ", DATA_AVAL)
|
|
19 |
user_question: str = st.text_area("Enter your groovy questions here")
|
20 |
access_key: str = st.text_input("Enter your gpt key here", type="password")
|
21 |
|
22 |
-
if (
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
19 |
user_question: str = st.text_area("Enter your groovy questions here")
|
20 |
access_key: str = st.text_input("Enter your gpt key here", type="password")
|
21 |
|
22 |
+
if st.button('Query Database'):
|
23 |
+
if (user_question == ""):
|
24 |
+
st.stop()
|
25 |
+
else:
|
26 |
+
st.header("Results")
|
27 |
+
# Perform the Chromadb query.
|
28 |
+
results = schemer.query(
|
29 |
+
query_texts=[user_question],
|
30 |
+
n_results=10,
|
31 |
+
include = ['documents']
|
32 |
+
)
|
33 |
+
st.write(results)
|