Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -253,11 +253,11 @@ if prompt := st.chat_input("Tell me about YSA"):
|
|
253 |
filtered_ref = ref[ref["distances"] < special_threshold]
|
254 |
if filtered_ref.shape[0] > 0:
|
255 |
st.success("There are highly relevant information in our database.")
|
256 |
-
ref_from_db_search = filtered_ref["answers"]
|
257 |
final_ref = filtered_ref
|
258 |
else:
|
259 |
st.warning("The database may not have relevant information to help your question so please be aware of hallucinations.")
|
260 |
-
ref_from_db_search = ref["answers"]
|
261 |
final_ref = ref
|
262 |
|
263 |
try:
|
|
|
253 |
filtered_ref = ref[ref["distances"] < special_threshold]
|
254 |
if filtered_ref.shape[0] > 0:
|
255 |
st.success("There are highly relevant information in our database.")
|
256 |
+
ref_from_db_search = filtered_ref["answers"].str.cat(sep=' ')
|
257 |
final_ref = filtered_ref
|
258 |
else:
|
259 |
st.warning("The database may not have relevant information to help your question so please be aware of hallucinations.")
|
260 |
+
ref_from_db_search = ref["answers"].str.cat(sep=' ')
|
261 |
final_ref = ref
|
262 |
|
263 |
try:
|