nickmuchi commited on
Commit
a0c27f5
β€’
1 Parent(s): 013de8c

Update pages/3_Earnings_Semantic_Search_πŸ”Ž_.py

Browse files
pages/3_Earnings_Semantic_Search_πŸ”Ž_.py CHANGED
@@ -42,7 +42,7 @@ try:
42
  corpus_embeddings = sbert.encode(passages, convert_to_tensor=True, show_progress_bar=True)
43
  question_embedding = sbert.encode(search_input, convert_to_tensor=True)
44
  question_embedding = question_embedding.cpu()
45
- hits = util.semantic_search(question_embedding, corpus_embeddings, top_k=top_k,score_function=util.dot_score)
46
  hits = hits[0] # Get the hits for the first query
47
 
48
  ##### Re-Ranking #####
 
42
  corpus_embeddings = sbert.encode(passages, convert_to_tensor=True, show_progress_bar=True)
43
  question_embedding = sbert.encode(search_input, convert_to_tensor=True)
44
  question_embedding = question_embedding.cpu()
45
+ hits = util.semantic_search(question_embedding, corpus_embeddings, top_k=top_k)
46
  hits = hits[0] # Get the hits for the first query
47
 
48
  ##### Re-Ranking #####