abrar-adnan commited on
Commit
2616e79
1 Parent(s): 3b983a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -11
app.py CHANGED
@@ -182,17 +182,6 @@ def video_processing(video_file, encoded_video):
182
  "text_sentiment" : text_sentiment
183
  }
184
 
185
- for item in final_result_dict:
186
- emotions = item['face_emotion']
187
- top_emotions = dict(sorted(emotions.items(), key=lambda x: x[1], reverse=True)[:3])
188
- item['face_emotion'] = top_emotions
189
-
190
- # Update the text_emotion data
191
- for item in final_result_dict:
192
- emotions = item['text_emotion']
193
- top_emotions = sorted(emotions, key=lambda x: x['score'], reverse=True)[:3]
194
- item['text_emotion'] = top_emotions
195
-
196
  return final_result_dict
197
 
198
 
 
182
  "text_sentiment" : text_sentiment
183
  }
184
 
 
 
 
 
 
 
 
 
 
 
 
185
  return final_result_dict
186
 
187