Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,9 +27,9 @@ def predict_sentiment(text):
|
|
| 27 |
# --- NEW CODE: Map prediction to labels ---
|
| 28 |
# 3. Define the mapping from numbers to labels
|
| 29 |
sentiment_map = {
|
| 30 |
-
0: "
|
| 31 |
-
1: "
|
| 32 |
-
2: "
|
| 33 |
}
|
| 34 |
|
| 35 |
# 4. Get the label from the map.
|
|
|
|
| 27 |
# --- NEW CODE: Map prediction to labels ---
|
| 28 |
# 3. Define the mapping from numbers to labels
|
| 29 |
sentiment_map = {
|
| 30 |
+
0: "NEUTRAL",
|
| 31 |
+
1: "HAPPY",
|
| 32 |
+
2: "SAD"
|
| 33 |
}
|
| 34 |
|
| 35 |
# 4. Get the label from the map.
|