MarMont commited on
Commit
942f04c
1 Parent(s): 47a2821

fixed local variables

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -209,6 +209,7 @@ def dataframeProcessing(dataset):
209
  df['lemma_tokens'] = df['lemmas_back_to_text'].apply(tokenize)
210
 
211
  # Create a id2word dictionary
 
212
  id2word = Dictionary(df['lemma_tokens'])
213
 
214
  # Filtering Extremes
@@ -239,6 +240,8 @@ def dataframeProcessing(dataset):
239
  step=1)
240
 
241
  k_max = max(coherence_values)
 
 
242
  num_topics = coherence_values.index(k_max) + 2
243
 
244
  lda_model = gensim.models.ldamodel.LdaModel(corpus=corpus,
 
209
  df['lemma_tokens'] = df['lemmas_back_to_text'].apply(tokenize)
210
 
211
  # Create a id2word dictionary
212
+ global id2word
213
  id2word = Dictionary(df['lemma_tokens'])
214
 
215
  # Filtering Extremes
 
240
  step=1)
241
 
242
  k_max = max(coherence_values)
243
+
244
+ global num_topics
245
  num_topics = coherence_values.index(k_max) + 2
246
 
247
  lda_model = gensim.models.ldamodel.LdaModel(corpus=corpus,