Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -61,12 +61,11 @@ cross_encoder = CrossEncoder(option2, device='cpu')
|
|
61 |
passages = []
|
62 |
|
63 |
# load pre-train embeedings files
|
64 |
-
embedding_cache_path = 'etsy-embeddings-gpu-total-0530.pkl'
|
65 |
print("Load pre-computed embeddings from disc")
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
|
71 |
from rank_bm25 import BM25Okapi
|
72 |
from sklearn.feature_extraction import _stop_words
|
|
|
61 |
passages = []
|
62 |
|
63 |
# load pre-train embeedings files
|
|
|
64 |
print("Load pre-computed embeddings from disc")
|
65 |
+
embedding_cache_path = 'embeddings.pt'
|
66 |
+
corpus_embeddings = torch.load(embedding_cache_path)
|
67 |
+
with open('sentences.json', 'r') as file:
|
68 |
+
passages = json.load(file)
|
69 |
|
70 |
from rank_bm25 import BM25Okapi
|
71 |
from sklearn.feature_extraction import _stop_words
|