Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -85,7 +85,8 @@ def get_emotional_tone_tag(emotions, sentiment, patterns, abuse_score=0):
|
|
85 |
# Main function
|
86 |
def analyze_message(text):
|
87 |
preprocessed = preprocess_sentiment_text(text)
|
88 |
-
|
|
|
89 |
sentiment_label = "supportive" if sentiment["label"] == "POSITIVE" else "undermining"
|
90 |
sentiment_score = round(sentiment["score"] * 100, 2)
|
91 |
|
|
|
85 |
# Main function
|
86 |
def analyze_message(text):
|
87 |
preprocessed = preprocess_sentiment_text(text)
|
88 |
+
sst_result = sst_classifier(preprocessed)
|
89 |
+
sentiment = sst_result[0]
|
90 |
sentiment_label = "supportive" if sentiment["label"] == "POSITIVE" else "undermining"
|
91 |
sentiment_score = round(sentiment["score"] * 100, 2)
|
92 |
|