Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -295,12 +295,7 @@ def process_and_summarize(df, bert_tokenizer, bert_model, emotion_classifier, to
|
|
| 295 |
topics, probs = topic_model.fit_transform(texts, embeddings)
|
| 296 |
|
| 297 |
|
| 298 |
-
|
| 299 |
-
if not valid_topics:
|
| 300 |
-
st.warning(f"No valid topics generated for {country}")
|
| 301 |
-
continue
|
| 302 |
-
|
| 303 |
-
topic_counts = Counter(valid_topics)
|
| 304 |
|
| 305 |
top_topics = format_topics(topic_model, topic_counts.most_common(top_n))
|
| 306 |
top_emotions = format_emotions(Counter(all_emotions).most_common(top_n))
|
|
|
|
| 295 |
topics, probs = topic_model.fit_transform(texts, embeddings)
|
| 296 |
|
| 297 |
|
| 298 |
+
topic_counts = Counter(topics)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 299 |
|
| 300 |
top_topics = format_topics(topic_model, topic_counts.most_common(top_n))
|
| 301 |
top_emotions = format_emotions(Counter(all_emotions).most_common(top_n))
|