abokbot commited on
Commit
fdde008
·
1 Parent(s): 4cbcb94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -59,6 +59,7 @@ def search():
59
  query = st_text_area
60
  ##### Sematic Search #####
61
  # Encode the query using the bi-encoder and find potentially relevant passages
 
62
  question_embedding = bi_encoder.encode(query, convert_to_tensor=True)
63
  hits = util.semantic_search(question_embedding, wikipedia_embedding, top_k=top_k)
64
  hits = hits[0] # Get the hits for the first query
 
59
  query = st_text_area
60
  ##### Sematic Search #####
61
  # Encode the query using the bi-encoder and find potentially relevant passages
62
+ top_k = 32
63
  question_embedding = bi_encoder.encode(query, convert_to_tensor=True)
64
  hits = util.semantic_search(question_embedding, wikipedia_embedding, top_k=top_k)
65
  hits = hits[0] # Get the hits for the first query