Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,11 +26,11 @@ def predict_sentiment(text):
|
|
| 26 |
|
| 27 |
# Map numeric labels to meaningful strings and get probabilities
|
| 28 |
if prediction == 4:
|
| 29 |
-
sentiment = "Bad
|
| 30 |
elif prediction == 0:
|
| 31 |
-
sentiment = "Good
|
| 32 |
elif prediction == 3:
|
| 33 |
-
sentiment = "Neutral
|
| 34 |
else:
|
| 35 |
sentiment = "Unknown" # Should not happen, but good practice
|
| 36 |
|
|
|
|
| 26 |
|
| 27 |
# Map numeric labels to meaningful strings and get probabilities
|
| 28 |
if prediction == 4:
|
| 29 |
+
sentiment = "Bad sentence"
|
| 30 |
elif prediction == 0:
|
| 31 |
+
sentiment = "Good sentence"
|
| 32 |
elif prediction == 3:
|
| 33 |
+
sentiment = "Neutral sentence"
|
| 34 |
else:
|
| 35 |
sentiment = "Unknown" # Should not happen, but good practice
|
| 36 |
|