Spaces:
Runtime error
Runtime error
Update app.py
Browse filesChanged number of topics being generated from 10 to 6
app.py
CHANGED
@@ -76,7 +76,7 @@ def process_text(texts, stop_words, bigram_mod, nlp):
|
|
76 |
|
77 |
return data_lemmatized
|
78 |
|
79 |
-
def create_lda_model(corpus, id2word, num_topics=
|
80 |
lda_model = gensim.models.LdaModel(corpus=corpus,
|
81 |
id2word=id2word,
|
82 |
num_topics=num_topics,
|
@@ -123,7 +123,7 @@ def topic_modeling(reviews):
|
|
123 |
corpus = [id2word.doc2bow(text) for text in processed_data]
|
124 |
|
125 |
# Create LDA model
|
126 |
-
lda_model = create_lda_model(corpus, id2word, num_topics=
|
127 |
|
128 |
# Print topics
|
129 |
topics = print_topics(lda_model)
|
|
|
76 |
|
77 |
return data_lemmatized
|
78 |
|
79 |
+
def create_lda_model(corpus, id2word, num_topics=6):
|
80 |
lda_model = gensim.models.LdaModel(corpus=corpus,
|
81 |
id2word=id2word,
|
82 |
num_topics=num_topics,
|
|
|
123 |
corpus = [id2word.doc2bow(text) for text in processed_data]
|
124 |
|
125 |
# Create LDA model
|
126 |
+
lda_model = create_lda_model(corpus, id2word, num_topics=6)
|
127 |
|
128 |
# Print topics
|
129 |
topics = print_topics(lda_model)
|