enoreyes commited on
Commit
927c37a
·
1 Parent(s): cad7bb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -91,6 +91,10 @@ def sentiment(diarized, emotion_pipeline):
91
  speaker_speech, speaker_id = diarized[i]
92
  times, _ = diarized[i + 1]
93
 
 
 
 
 
94
  sentences = split_into_sentences(speaker_speech)
95
  if "Customer" in speaker_id:
96
 
 
91
  speaker_speech, speaker_id = diarized[i]
92
  times, _ = diarized[i + 1]
93
 
94
+ start_time, end_time = times[5:].split("-")
95
+ start_time, end_time = float(start_time), float(end_time)
96
+ interval_size = (end_time - start_time) / len(sentences)
97
+
98
  sentences = split_into_sentences(speaker_speech)
99
  if "Customer" in speaker_id:
100