eagle0504 commited on
Commit
e2c7632
1 Parent(s): 72b6b61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- {"role": "assistant", "content": final_ref.to_json()}
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
+ # )