SamanthaStorm commited on
Commit
9da2b5c
·
verified ·
1 Parent(s): 6e598a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- sentiment = sst_result[0] # get the first result
 
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