wilmerags commited on
Commit
ec9c642
·
1 Parent(s): f0f3e26

test: Debug words similarity

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -164,6 +164,7 @@ def generate_plot(
164
  cluster_to_words_similarities = util.dot_score(cluster_embeddings_avg, cluster_words_embeddings)
165
  cluster_to_words_similarities = [(word_ix, similarity) for word_ix, similarity in enumerate(cluster_to_words_similarities[0])]
166
  cluster_to_words_similarities = sorted(cluster_to_words_similarities, key=lambda x: x[1], reverse=True)
 
167
  while len(cluster_keyword[label]) < 3:
168
  most_descriptive = cluster_to_words_similarities.pop(0)
169
  cluster_keyword[label].append(cluster_words[most_descriptive[0]])
 
164
  cluster_to_words_similarities = util.dot_score(cluster_embeddings_avg, cluster_words_embeddings)
165
  cluster_to_words_similarities = [(word_ix, similarity) for word_ix, similarity in enumerate(cluster_to_words_similarities[0])]
166
  cluster_to_words_similarities = sorted(cluster_to_words_similarities, key=lambda x: x[1], reverse=True)
167
+ st.write(cluster_to_words_similarities)
168
  while len(cluster_keyword[label]) < 3:
169
  most_descriptive = cluster_to_words_similarities.pop(0)
170
  cluster_keyword[label].append(cluster_words[most_descriptive[0]])