Spaces:
GIZ
/
Running on CPU Upgrade

prashant commited on
Commit
40cb026
1 Parent(s): 8e83ccf

semantic update

Browse files
Files changed (2) hide show
  1. appStore/keyword_search.py +1 -1
  2. utils/search.py +1 -8
appStore/keyword_search.py CHANGED
@@ -83,6 +83,6 @@ def app():
83
  logging.info("starting semantic search")
84
  with st.spinner("Performing Similar/Contextual search"):
85
  st.markdown("##### Top few semantic search results #####")
86
- semantic_search(queryList,paraList,show_answers=True)
87
 
88
 
 
83
  logging.info("starting semantic search")
84
  with st.spinner("Performing Similar/Contextual search"):
85
  st.markdown("##### Top few semantic search results #####")
86
+ semantic_search(queryList,paraList,show_answers=False)
87
 
88
 
utils/search.py CHANGED
@@ -291,6 +291,7 @@ def semantic_search(query:Text,documents:List[Document],show_answers = False):
291
  else:
292
 
293
  for answer in results['answers']:
 
294
  matches = []
295
  doc = []
296
  if answer.score >0.01:
@@ -301,14 +302,6 @@ def semantic_search(query:Text,documents:List[Document],show_answers = False):
301
  matches.append([start_idx,end_idx])
302
  doc.append(doc_store.get_document_by_id(temp['document_id']).content)
303
  searchAnnotator(matches,doc)
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
 
312
- return results
313
 
314
 
 
291
  else:
292
 
293
  for answer in results['answers']:
294
+ st.write(answer)
295
  matches = []
296
  doc = []
297
  if answer.score >0.01:
 
302
  matches.append([start_idx,end_idx])
303
  doc.append(doc_store.get_document_by_id(temp['document_id']).content)
304
  searchAnnotator(matches,doc)
 
 
 
 
 
 
 
305
 
 
306
 
307