fix topic assignment
Browse files
app.py
CHANGED
@@ -356,7 +356,7 @@ def assignTopic(l):
|
|
356 |
for x in l:
|
357 |
topics.append(x[0])
|
358 |
|
359 |
-
def topic_assignment():
|
360 |
lda_topics = lda_model_final.show_topics(num_words=10)
|
361 |
|
362 |
topics = []
|
@@ -515,7 +515,7 @@ def main(dataset, model):
|
|
515 |
if model == 'LDA':
|
516 |
base_lda()
|
517 |
coherence = hyperparameter_optimization()
|
518 |
-
topic_assignment()
|
519 |
else:
|
520 |
base_bertopic()
|
521 |
optimized_bertopic()
|
|
|
356 |
for x in l:
|
357 |
topics.append(x[0])
|
358 |
|
359 |
+
def topic_assignment(df):
|
360 |
lda_topics = lda_model_final.show_topics(num_words=10)
|
361 |
|
362 |
topics = []
|
|
|
515 |
if model == 'LDA':
|
516 |
base_lda()
|
517 |
coherence = hyperparameter_optimization()
|
518 |
+
topic_assignment(df)
|
519 |
else:
|
520 |
base_bertopic()
|
521 |
optimized_bertopic()
|