Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -115,11 +115,7 @@ def simulate(image0, image1):
|
|
| 115 |
|
| 116 |
preference = 0 if avg_preference < 0.5 else 1
|
| 117 |
|
| 118 |
-
all_reasons = []
|
| 119 |
-
for item in reasons:
|
| 120 |
-
words = [word.strip() for word in item.split(',')]
|
| 121 |
-
all_reasons.extend(words)
|
| 122 |
-
|
| 123 |
wordcloud = WordCloud(width = 800, height = 400, background_color ='white').generate(all_reasons)
|
| 124 |
|
| 125 |
plt.figure(figsize=(10,5))
|
|
|
|
| 115 |
|
| 116 |
preference = 0 if avg_preference < 0.5 else 1
|
| 117 |
|
| 118 |
+
all_reasons = ' '.join([word.strip() for item in data for word in item.split(',')])
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
wordcloud = WordCloud(width = 800, height = 400, background_color ='white').generate(all_reasons)
|
| 120 |
|
| 121 |
plt.figure(figsize=(10,5))
|