shivanis14
commited on
Commit
•
f546480
1
Parent(s):
b74ee3b
Update calc_cosine_similarity.py
Browse files
calc_cosine_similarity.py
CHANGED
@@ -41,7 +41,7 @@ def find_relevant_file_paths(ingredient, embeddings, N=2, thres=0.7):
|
|
41 |
|
42 |
#Sort cosine_sims_dict based on value of cosine_sim
|
43 |
top_n_cosine_sims_dict = dict(sorted(cosine_sims_dict.items(), key=lambda item: item[1], reverse=True)[:N])
|
44 |
-
print(f"DEBUG : top_n_cosine_sims_dict : {top_n_cosine_sims_dict}")
|
45 |
|
46 |
for key, value in top_n_cosine_sims_dict.items():
|
47 |
if value > thres:
|
|
|
41 |
|
42 |
#Sort cosine_sims_dict based on value of cosine_sim
|
43 |
top_n_cosine_sims_dict = dict(sorted(cosine_sims_dict.items(), key=lambda item: item[1], reverse=True)[:N])
|
44 |
+
print(f"DEBUG : Ingredient {ingredient} top_n_cosine_sims_dict : {top_n_cosine_sims_dict}")
|
45 |
|
46 |
for key, value in top_n_cosine_sims_dict.items():
|
47 |
if value > thres:
|