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
|
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 #####
|