Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -289,7 +289,10 @@ def extract_problem_domains(df,
|
|
289 |
cluster_representations = {}
|
290 |
for i in range(optimal_n_clusters):
|
291 |
center = kmeans.cluster_centers_[i]
|
292 |
-
|
|
|
|
|
|
|
293 |
top_words = [feature_names[index] for index in top_word_indices]
|
294 |
cluster_representations[i] = top_words
|
295 |
|
|
|
289 |
cluster_representations = {}
|
290 |
for i in range(optimal_n_clusters):
|
291 |
center = kmeans.cluster_centers_[i]
|
292 |
+
|
293 |
+
# top_word_indices = center.argsort()[-top_words:][::-1]
|
294 |
+
top_word_indices = center.argsort()[-top_words:][::-1].tolist()
|
295 |
+
|
296 |
top_words = [feature_names[index] for index in top_word_indices]
|
297 |
cluster_representations[i] = top_words
|
298 |
|