Spaces:
Build error
Build error
test: Debug words similarity
Browse files
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]])
|