Spaces:
Runtime error
Runtime error
CharimCibersegurata
commited on
Commit
•
fdd8902
1
Parent(s):
82f859a
Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,14 @@ import numpy as np
|
|
8 |
|
9 |
# parameters for loading data and images
|
10 |
detection_model_path = 'haarcascade_frontalface_default.xml'
|
|
|
11 |
emotion_model_path = 'emotion_detection_model_state.pth'
|
12 |
|
13 |
# hyper-parameters for bounding boxes shape
|
14 |
# loading models
|
15 |
face_detection = cv2.CascadeClassifier(detection_model_path)
|
16 |
-
|
|
|
17 |
EMOTIONS = ["angry", "disgusted", "scared", "happy", "sad", "surprised",
|
18 |
"neutral"]
|
19 |
|
|
|
8 |
|
9 |
# parameters for loading data and images
|
10 |
detection_model_path = 'haarcascade_frontalface_default.xml'
|
11 |
+
#_mini_XCEPTION.102-0.66.hdf5
|
12 |
emotion_model_path = 'emotion_detection_model_state.pth'
|
13 |
|
14 |
# hyper-parameters for bounding boxes shape
|
15 |
# loading models
|
16 |
face_detection = cv2.CascadeClassifier(detection_model_path)
|
17 |
+
#load_model(emotion_model_path, compile=False)
|
18 |
+
emotion_classifier = torch.load(emotion_model_path)
|
19 |
EMOTIONS = ["angry", "disgusted", "scared", "happy", "sad", "surprised",
|
20 |
"neutral"]
|
21 |
|