Spaces:
Running
Running
Update pages/2 Topic Modeling.py
Browse files
pages/2 Topic Modeling.py
CHANGED
@@ -287,7 +287,7 @@ if uploaded_file is not None:
|
|
287 |
min_dist=0.0, metric='cosine', random_state=42)
|
288 |
cluster_model = KMeans(n_clusters=num_topic)
|
289 |
nlp = en_core_web_sm.load(exclude=['tagger', 'parser', 'ner', 'attribute_ruler', 'lemmatizer'])
|
290 |
-
topic_model = BERTopic(embedding_model=nlp, hdbscan_model=cluster_model, language="multilingual", umap_model=umap_model)
|
291 |
topics, probs = topic_model.fit_transform(topic_abs)
|
292 |
return topic_model, topic_time, topics, probs
|
293 |
|
|
|
287 |
min_dist=0.0, metric='cosine', random_state=42)
|
288 |
cluster_model = KMeans(n_clusters=num_topic)
|
289 |
nlp = en_core_web_sm.load(exclude=['tagger', 'parser', 'ner', 'attribute_ruler', 'lemmatizer'])
|
290 |
+
topic_model = BERTopic(embedding_model=nlp, hdbscan_model=cluster_model, language="multilingual", umap_model=umap_model)
|
291 |
topics, probs = topic_model.fit_transform(topic_abs)
|
292 |
return topic_model, topic_time, topics, probs
|
293 |
|