mdanish commited on
Commit
e829bf1
·
verified ·
1 Parent(s): cfef3c1

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -64,7 +64,7 @@ def knn_get_score(knn, k, cat, vec):
64
  kscores = scores[sortinds][:k]
65
  st.write('kscores.shape', kscores.shape)
66
  # Get actual sorted similiarity scores
67
- ksims = np.expand_dims(cos_sim_table[sortinds][:k], axis=0)
68
  st.write('ksims.shape', ksims.shape)
69
  # Apply normalization after exponential formula
70
  ksims = softmax(10**ksims)
 
64
  kscores = scores[sortinds][:k]
65
  st.write('kscores.shape', kscores.shape)
66
  # Get actual sorted similiarity scores
67
+ ksims = cos_sim_table[sortinds][:k]
68
  st.write('ksims.shape', ksims.shape)
69
  # Apply normalization after exponential formula
70
  ksims = softmax(10**ksims)