Spaces:
Runtime error
Runtime error
from sklearn.decomposition import NMF | |
from sklearn.feature_extraction.text import CountVectorizer | |
from sklearn.pipeline import Pipeline | |
bow_vectorizer = CountVectorizer() | |
nmf = NMF(n_components=10) | |
topic_pipeline = Pipeline( | |
[ | |
("bow", bow_vectorizer), | |
("nmf", nmf), | |
] | |
) | |
topic_pipeline.fit(texts) | |
import topicwizard | |
topicwizard.visualize(pipeline=topic_pipeline, corpus=texts) | |