kambris commited on
Commit
17fef6a
·
verified ·
1 Parent(s): a8fd7c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -222,19 +222,19 @@ def format_emotions(emotion_counts):
222
  })
223
  return formatted_emotions
224
 
225
- def process_and_summarize(df, bert_tokenizer, bert_model, emotion_classifier, top_n=50, topic_strategy="Auto", n_topics=None, min_topic_size=1):
226
  """Process the data and generate summaries with flexible topic configuration."""
227
  summaries = []
228
 
229
  topic_model_params = {
230
  "language": "arabic",
231
  "calculate_probabilities": False,
232
- "min_topic_size": 1,
233
  "n_gram_range": (1, 1),
234
  "top_n_words": 15,
235
  "verbose": True,
236
  "hdbscan_args": {
237
- "min_cluster_size": 2,
238
  "min_samples": 1,
239
  "cluster_selection_epsilon": 0.1
240
  }
@@ -382,7 +382,7 @@ if uploaded_file is not None:
382
  top_n=top_n,
383
  topic_strategy=topic_strategy,
384
  n_topics=n_topics if topic_strategy == "Manual" else None,
385
- min_topic_size=1
386
  )
387
 
388
  if summaries:
 
222
  })
223
  return formatted_emotions
224
 
225
+ def process_and_summarize(df, bert_tokenizer, bert_model, emotion_classifier, top_n=50, topic_strategy="Auto", n_topics=None, min_topic_size=5):
226
  """Process the data and generate summaries with flexible topic configuration."""
227
  summaries = []
228
 
229
  topic_model_params = {
230
  "language": "arabic",
231
  "calculate_probabilities": False,
232
+ "min_topic_size": 5,
233
  "n_gram_range": (1, 1),
234
  "top_n_words": 15,
235
  "verbose": True,
236
  "hdbscan_args": {
237
+ "min_cluster_size": 5,
238
  "min_samples": 1,
239
  "cluster_selection_epsilon": 0.1
240
  }
 
382
  top_n=top_n,
383
  topic_strategy=topic_strategy,
384
  n_topics=n_topics if topic_strategy == "Manual" else None,
385
+ min_topic_size=5
386
  )
387
 
388
  if summaries: