Arko Banik commited on
Commit
c47440e
·
1 Parent(s): 8243f22

returns tuple of cat_idx and score

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -214,7 +214,7 @@ def get_sorted_cosine_similarity(embeddings_metadata):
214
  cat = categories[index]
215
  cat_embed = category_embeddings[cat]
216
  # Calc cosine sim
217
- cat_scores.append((cat, np.dot(input_embedding,cat_embed)))
218
  # Store doc_id and score as a tuple
219
 
220
 
 
214
  cat = categories[index]
215
  cat_embed = category_embeddings[cat]
216
  # Calc cosine sim
217
+ cat_scores.append((index, np.dot(input_embedding,cat_embed)))
218
  # Store doc_id and score as a tuple
219
 
220