Spaces:
Runtime error
Runtime error
samarthagarwal23
commited on
Commit
·
11ee1d3
1
Parent(s):
3b7339b
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,14 @@ from sentence_transformers import SentenceTransformer, util
|
|
6 |
mdl_name = 'sentence-transformers/all-distilroberta-v1'
|
7 |
model = SentenceTransformer(mdl_name)
|
8 |
|
9 |
-
embedding_cache_path = ""
|
10 |
with open(embedding_cache_path, "rb") as fIn:
|
11 |
cache_data = pickle.load(fIn)
|
12 |
|
|
|
|
|
13 |
|
14 |
-
def user_query_recommend(query, min_p, max_p
|
15 |
# Embed user query
|
16 |
embedding = model.encode(query)
|
17 |
|
|
|
6 |
mdl_name = 'sentence-transformers/all-distilroberta-v1'
|
7 |
model = SentenceTransformer(mdl_name)
|
8 |
|
9 |
+
embedding_cache_path = "scotch_embd_distilroberta.pkl"
|
10 |
with open(embedding_cache_path, "rb") as fIn:
|
11 |
cache_data = pickle.load(fIn)
|
12 |
|
13 |
+
embedding_table = cache_data["embeddings"]
|
14 |
+
reviews = cache_data["data"]
|
15 |
|
16 |
+
def user_query_recommend(query, min_p, max_p):
|
17 |
# Embed user query
|
18 |
embedding = model.encode(query)
|
19 |
|