Spaces:
Runtime error
Runtime error
CharimCibersegurata
commited on
Commit
•
819e871
1
Parent(s):
26a0585
Update app.py
Browse files
app.py
CHANGED
@@ -8,14 +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 = '_mini_XCEPTION.102-0.66.hdf5'
|
12 |
-
|
13 |
|
14 |
# hyper-parameters for bounding boxes shape
|
15 |
# loading models
|
16 |
face_detection = cv2.CascadeClassifier(detection_model_path)
|
17 |
-
|
18 |
-
emotion_classifier = load_model(emotion_model_path, compile=False)
|
19 |
EMOTIONS = ["angry", "disgusted", "scared", "happy", "sad", "surprised",
|
20 |
"neutral"]
|
21 |
|
|
|
8 |
|
9 |
# parameters for loading data and images
|
10 |
detection_model_path = 'haarcascade_frontalface_default.xml'
|
11 |
+
#emotion_model_path = '_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 |
+
emotion_classifier = torch.load(emotion_model_path,map_location=torch.device('cpu'))
|
18 |
+
#emotion_classifier = load_model(emotion_model_path, compile=False)
|
19 |
EMOTIONS = ["angry", "disgusted", "scared", "happy", "sad", "surprised",
|
20 |
"neutral"]
|
21 |
|