shivanis14 commited on
Commit
8108d07
1 Parent(s): 0178108

Update calc_cosine_similarity.py

Browse files
Files changed (1) hide show
  1. calc_cosine_similarity.py +1 -1
calc_cosine_similarity.py CHANGED
@@ -51,7 +51,7 @@ def find_relevant_file_paths(ingredient, embeddings, N=2, thres=0.7):
51
  print(f"DEBUG : Ingredient {ingredient} top_n_cosine_sims_dict : {top_n_cosine_sims_dict}")
52
 
53
  for key, value in top_n_cosine_sims_dict.items():
54
- if value > thres:
55
  file_paths.append(f"article{key}.txt")
56
 
57
  return file_paths
 
51
  print(f"DEBUG : Ingredient {ingredient} top_n_cosine_sims_dict : {top_n_cosine_sims_dict}")
52
 
53
  for key, value in top_n_cosine_sims_dict.items():
54
+ if value.item() > thres:
55
  file_paths.append(f"article{key}.txt")
56
 
57
  return file_paths