Spaces:
Build error
Build error
Vedant Pungliya
commited on
Files
Browse files
app.py
CHANGED
|
@@ -964,12 +964,13 @@ def create_wordcloud(tokens, token1=None, token2=None):
|
|
| 964 |
if token2:
|
| 965 |
normalized_freq[token2] = normalized_freq.get(token2, 0) + 5
|
| 966 |
|
|
|
|
| 967 |
wc = WordCloud(
|
| 968 |
width=800, height=400,
|
| 969 |
background_color='white',
|
| 970 |
max_words=100,
|
| 971 |
prefer_horizontal=1.0, # Make all words horizontal
|
| 972 |
-
colormap='
|
| 973 |
).generate_from_frequencies(normalized_freq)
|
| 974 |
|
| 975 |
return wc
|
|
|
|
| 964 |
if token2:
|
| 965 |
normalized_freq[token2] = normalized_freq.get(token2, 0) + 5
|
| 966 |
|
| 967 |
+
# Custom colormap with dark shades of brown, green, and blue
|
| 968 |
wc = WordCloud(
|
| 969 |
width=800, height=400,
|
| 970 |
background_color='white',
|
| 971 |
max_words=100,
|
| 972 |
prefer_horizontal=1.0, # Make all words horizontal
|
| 973 |
+
colormap='Dark2' # Dark colormap with browns, greens, blues
|
| 974 |
).generate_from_frequencies(normalized_freq)
|
| 975 |
|
| 976 |
return wc
|