Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -52,12 +52,14 @@ top_k = 32 #Number of passages we want to retrieve with
|
|
52 |
#The bi-encoder will retrieve 100 documents. We use a cross-encoder, to re-rank the results list to improve the quality
|
53 |
cross_encoder = CrossEncoder(option2)
|
54 |
|
|
|
|
|
55 |
# load pre-train embeedings files
|
56 |
embedding_cache_path = 'etsy-embeddings-cpu.pkl'
|
57 |
print("Load pre-computed embeddings from disc")
|
58 |
with open(embedding_cache_path, "rb") as fIn:
|
59 |
cache_data = pickle.load(fIn)
|
60 |
-
|
61 |
corpus_embeddings = cache_data['embeddings']
|
62 |
|
63 |
# This function will search all wikipedia articles for passages that
|
|
|
52 |
#The bi-encoder will retrieve 100 documents. We use a cross-encoder, to re-rank the results list to improve the quality
|
53 |
cross_encoder = CrossEncoder(option2)
|
54 |
|
55 |
+
passages = []
|
56 |
+
|
57 |
# load pre-train embeedings files
|
58 |
embedding_cache_path = 'etsy-embeddings-cpu.pkl'
|
59 |
print("Load pre-computed embeddings from disc")
|
60 |
with open(embedding_cache_path, "rb") as fIn:
|
61 |
cache_data = pickle.load(fIn)
|
62 |
+
passages = cache_data['sentences']
|
63 |
corpus_embeddings = cache_data['embeddings']
|
64 |
|
65 |
# This function will search all wikipedia articles for passages that
|