Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ with open("./embedding.pkl", "rb") as f:
|
|
20 |
# lModelRec = pickle.load(f)
|
21 |
|
22 |
def recomm(inputPaper):
|
23 |
-
encodePaper =
|
24 |
cosine_score = util.cos_sim(Lencode, encodePaper)
|
25 |
top_scores = torch.topk(cosine_score, dim=0, k=4)
|
26 |
paperList = []
|
|
|
20 |
# lModelRec = pickle.load(f)
|
21 |
|
22 |
def recomm(inputPaper):
|
23 |
+
encodePaper = model.encode(inputPaper)
|
24 |
cosine_score = util.cos_sim(Lencode, encodePaper)
|
25 |
top_scores = torch.topk(cosine_score, dim=0, k=4)
|
26 |
paperList = []
|