abrar-adnan commited on
Commit
4190733
1 Parent(s): f20ef5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -153,6 +153,8 @@ def video_processing(video_file, encoded_video):
153
  print(f'Time taken: {end_time-start_time}')
154
  if os.path.exists("temp_video.mp4"):
155
  os.remove("temp_video.mp4")
 
 
156
  print(gaze_percentage)
157
 
158
  # Divide all emotion values by emotion count
@@ -167,14 +169,6 @@ def video_processing(video_file, encoded_video):
167
  "text_sentiment" : text_sentiment
168
  }
169
 
170
- print(f'total anger percentage = {angry}')
171
- print(f'total disgust percentage = {disgust}')
172
- print(f'total fear percentage = {fear}')
173
- print(f'total happy percentage = {happy}')
174
- print(f'total sad percentage = {sad}')
175
- print(f'total surprise percentage = {surprise}')
176
- print(f'total neutral percentage = {neutral}')
177
- final_result = "Gaze = "+str(gaze_percentage)+"\nFace Emotion = "+str(emotion)+"\nText Emotion = "+str(text_emotion)+"\nText transcription = "+str(transcription)+"\nText sentiment = "+str(text_sentiment)
178
  return final_result_dict
179
 
180
 
 
153
  print(f'Time taken: {end_time-start_time}')
154
  if os.path.exists("temp_video.mp4"):
155
  os.remove("temp_video.mp4")
156
+ if os.path.exists("audio.wav"):
157
+ os.remove("audio.wav")
158
  print(gaze_percentage)
159
 
160
  # Divide all emotion values by emotion count
 
169
  "text_sentiment" : text_sentiment
170
  }
171
 
 
 
 
 
 
 
 
 
172
  return final_result_dict
173
 
174