eagle0504 commited on
Commit
4457702
1 Parent(s): e2c7632

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -205,7 +205,7 @@ st.sidebar.markdown(
205
  This app guides you through YSA's website, utilizing a RAG-ready Q&A dataset [here](https://huggingface.co/datasets/eagle0504/youthless-homeless-shelter-web-scrape-dataset-qa-formatted) for chatbot assistance. 🤖 Enter a question, and it finds similar ones in the database, offering answers with a distance score to gauge relevance—the lower the score, the closer the match. 🎯 For better accuracy and to reduce errors, user feedback helps refine the database. ✨
206
 
207
  """)
208
-
209
  clear_button = st.sidebar.button("Clear Conversation", key="clear")
210
 
211
  if clear_button:
@@ -248,7 +248,7 @@ if prompt := st.chat_input("Tell me about YSA"):
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.")
 
205
  This app guides you through YSA's website, utilizing a RAG-ready Q&A dataset [here](https://huggingface.co/datasets/eagle0504/youthless-homeless-shelter-web-scrape-dataset-qa-formatted) for chatbot assistance. 🤖 Enter a question, and it finds similar ones in the database, offering answers with a distance score to gauge relevance—the lower the score, the closer the match. 🎯 For better accuracy and to reduce errors, user feedback helps refine the database. ✨
206
 
207
  """)
208
+ special_threshold = st.sidebar.slider('How old are you?', 0, 0.6, 0.1) # 0.3
209
  clear_button = st.sidebar.button("Clear Conversation", key="clear")
210
 
211
  if clear_button:
 
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.")