Upload app.py with huggingface_hub
Browse files
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 =
|
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)
|