Spaces:
Sleeping
Sleeping
jvroo
commited on
Commit
·
e6fee1c
1
Parent(s):
6103c26
Color Fix
Browse files
app.py
CHANGED
|
@@ -57,7 +57,7 @@ def analyze_sentiment(review, mode):
|
|
| 57 |
|
| 58 |
categories = ['POSITIVE', 'NEGATIVE']
|
| 59 |
sentiment_scores = [score if sentiment == 'POSITIVE' else (1 - score), score if sentiment == 'NEGATIVE' else (1 - score)]
|
| 60 |
-
colors = ['#4CAF50'
|
| 61 |
|
| 62 |
bars = ax.bar(categories, sentiment_scores, color=colors)
|
| 63 |
ax.set_ylim(0, 1)
|
|
|
|
| 57 |
|
| 58 |
categories = ['POSITIVE', 'NEGATIVE']
|
| 59 |
sentiment_scores = [score if sentiment == 'POSITIVE' else (1 - score), score if sentiment == 'NEGATIVE' else (1 - score)]
|
| 60 |
+
colors = ['#4CAF50', '#F44336']
|
| 61 |
|
| 62 |
bars = ax.bar(categories, sentiment_scores, color=colors)
|
| 63 |
ax.set_ylim(0, 1)
|