Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,7 +81,7 @@ def predict_emotion(video_path):
|
|
| 81 |
return last_frame, audio_path, predicted_label
|
| 82 |
|
| 83 |
def predict_emotion_gradio(video_path):
|
| 84 |
-
emotion_dict = {0: 'neutral', 1: 'calm', 2: 'happy', 3: 'sad', 4: 'angry', 5: 'fearful'}
|
| 85 |
last_frame, audio_path, predicted_label = predict_emotion(video_path)
|
| 86 |
predicted_emotion = emotion_dict[predicted_label]
|
| 87 |
return last_frame, audio_path, predicted_emotion
|
|
|
|
| 81 |
return last_frame, audio_path, predicted_label
|
| 82 |
|
| 83 |
def predict_emotion_gradio(video_path):
|
| 84 |
+
emotion_dict = {0: 'neutral', 1: 'calm', 2: 'happy', 3: 'sad', 4: 'angry', 5: 'fearful', 6: 'disgust', 7: 'surprised'}
|
| 85 |
last_frame, audio_path, predicted_label = predict_emotion(video_path)
|
| 86 |
predicted_emotion = emotion_dict[predicted_label]
|
| 87 |
return last_frame, audio_path, predicted_emotion
|