SantanuBanerjee commited on
Commit
812ab2f
·
verified ·
1 Parent(s): 2e7a421

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- top_word_indices = center.argsort()[-top_words:][::-1]
 
 
 
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