Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -278,6 +278,7 @@ def extract_problem_domains(df,
|
|
278 |
cluster_labels = kmeans.fit_predict(X)
|
279 |
|
280 |
# # BERTopic approach (commented out)
|
|
|
281 |
# topic_model = BERTopic()
|
282 |
# topics, _ = topic_model.fit_transform(df[text_column].tolist())
|
283 |
# topic_model.reduce_topics(df[text_column].tolist(), nr_topics=optimal_n_clusters)
|
@@ -298,9 +299,8 @@ def extract_problem_domains(df,
|
|
298 |
# print(f"top_words: {top_words}, type: {type(top_words)}")
|
299 |
# print(f"center.argsort(): {center.argsort()}, type: {type(center.argsort())}")
|
300 |
|
301 |
-
console_messages.append(f"top_words: {top_words}, type: {type(top_words)}"
|
302 |
-
|
303 |
-
)
|
304 |
|
305 |
|
306 |
# top_word_indices = center.argsort()[-top_words:][::-1]
|
|
|
278 |
cluster_labels = kmeans.fit_predict(X)
|
279 |
|
280 |
# # BERTopic approach (commented out)
|
281 |
+
console_messages.append("BERT is currently commented...")
|
282 |
# topic_model = BERTopic()
|
283 |
# topics, _ = topic_model.fit_transform(df[text_column].tolist())
|
284 |
# topic_model.reduce_topics(df[text_column].tolist(), nr_topics=optimal_n_clusters)
|
|
|
299 |
# print(f"top_words: {top_words}, type: {type(top_words)}")
|
300 |
# print(f"center.argsort(): {center.argsort()}, type: {type(center.argsort())}")
|
301 |
|
302 |
+
console_messages.append(f"top_words: {top_words}, type: {type(top_words)}")
|
303 |
+
console_messages.append(f"center.argsort(): {center.argsort()}, type: {type(center.argsort())}")
|
|
|
304 |
|
305 |
|
306 |
# top_word_indices = center.argsort()[-top_words:][::-1]
|