Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,12 @@ face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
|
|
9 |
model = model_from_json(open('facial_expression_model_structure.json', 'r').read())
|
10 |
model.load_weights('facial_expression_model_weights.h5')
|
11 |
|
|
|
12 |
emotions = ('angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral')
|
13 |
|
|
|
|
|
|
|
14 |
def blur_image(img):
|
15 |
blur = cv2.blur(img,(10, 10))
|
16 |
return blur
|
|
|
9 |
model = model_from_json(open('facial_expression_model_structure.json', 'r').read())
|
10 |
model.load_weights('facial_expression_model_weights.h5')
|
11 |
|
12 |
+
# Define the emotions
|
13 |
emotions = ('angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral')
|
14 |
|
15 |
+
# Define the frame scaling factor
|
16 |
+
scaling_factor = 1.0
|
17 |
+
|
18 |
def blur_image(img):
|
19 |
blur = cv2.blur(img,(10, 10))
|
20 |
return blur
|