eagle0504 commited on
Commit
4b2f61b
1 Parent(s): 0cc585c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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: