enoreyes commited on
Commit
45d37ac
·
1 Parent(s): 32850cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -5
app.py CHANGED
@@ -94,15 +94,10 @@ def sentiment(diarized, emotion_pipeline):
94
  outputs = emotion_pipeline(sentences)
95
 
96
  for idx, (o, t) in enumerate(zip(outputs, sentences)):
97
- sent = "neutral"
98
  if o["score"] > thresholds[o["label"]]:
99
  customer_sentiments.append(
100
  (t + f"({round(idx*interval_size+start_time,1)} s)", o["label"])
101
  )
102
- if o["label"] in {"joy", "love", "surprise"}:
103
- sent = "positive"
104
- elif o["label"] in {"sadness", "anger", "fear"}:
105
- sent = "negative"
106
 
107
  return customer_sentiments
108
 
 
94
  outputs = emotion_pipeline(sentences)
95
 
96
  for idx, (o, t) in enumerate(zip(outputs, sentences)):
 
97
  if o["score"] > thresholds[o["label"]]:
98
  customer_sentiments.append(
99
  (t + f"({round(idx*interval_size+start_time,1)} s)", o["label"])
100
  )
 
 
 
 
101
 
102
  return customer_sentiments
103