Update app.py
Browse files
app.py
CHANGED
@@ -248,7 +248,7 @@ if prompt := st.chat_input("Tell me about YSA"):
|
|
248 |
"distances": results["distances"][0]
|
249 |
}
|
250 |
)
|
251 |
-
special_threshold = 0.3
|
252 |
filtered_ref = ref[ref["distances"] < special_threshold]
|
253 |
if filtered_ref.shape[0] > 0:
|
254 |
st.success("There are highly relevant information in our database.")
|
@@ -306,6 +306,6 @@ if prompt := st.chat_input("Tell me about YSA"):
|
|
306 |
st.table(final_ref)
|
307 |
# Add assistant response to chat history
|
308 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
309 |
-
st.session_state.messages.append(
|
310 |
-
|
311 |
-
)
|
|
|
248 |
"distances": results["distances"][0]
|
249 |
}
|
250 |
)
|
251 |
+
special_threshold = st.sidebar.slider('How old are you?', 0, 0.6, 0.1) # 0.3
|
252 |
filtered_ref = ref[ref["distances"] < special_threshold]
|
253 |
if filtered_ref.shape[0] > 0:
|
254 |
st.success("There are highly relevant information in our database.")
|
|
|
306 |
st.table(final_ref)
|
307 |
# Add assistant response to chat history
|
308 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
309 |
+
# st.session_state.messages.append(
|
310 |
+
# {"role": "assistant", "content": final_ref.to_json()}
|
311 |
+
# )
|