Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -114,10 +114,12 @@ def simulate(image0, image1):
|
|
114 |
avg_prob = sum(probs) / len(preferences)
|
115 |
|
116 |
preference = 0 if avg_preference < 0.5 else 1
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
121 |
wordcloud = WordCloud(width = 800, height = 400, background_color ='white').generate(all_reasons)
|
122 |
|
123 |
plt.figure(figsize=(10,5))
|
|
|
114 |
avg_prob = sum(probs) / len(preferences)
|
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))
|