Update app.py
Browse files
app.py
CHANGED
|
@@ -173,7 +173,7 @@ def generate_wordcloud(entities: List[Dict], color_map: Dict[str, str]) -> np.nd
|
|
| 173 |
entity_type = next((t for t, w in zip(token_types, token_texts) if w == word), None)
|
| 174 |
return color_map.get(entity_type, "#FFFFFF")
|
| 175 |
|
| 176 |
-
wordcloud = WordCloud(width=800, height=400, background_color='
|
| 177 |
|
| 178 |
# Convert to image array
|
| 179 |
plt.figure(figsize=(10, 5))
|
|
|
|
| 173 |
entity_type = next((t for t, w in zip(token_types, token_texts) if w == word), None)
|
| 174 |
return color_map.get(entity_type, "#FFFFFF")
|
| 175 |
|
| 176 |
+
wordcloud = WordCloud(width=800, height=400, background_color='#121212', color_func=color_func).generate_from_frequencies(word_freq)
|
| 177 |
|
| 178 |
# Convert to image array
|
| 179 |
plt.figure(figsize=(10, 5))
|