Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -73,8 +73,9 @@ def predict_emotion(frame):
|
|
73 |
label = EMOTIONS[preds.argmax()]
|
74 |
|
75 |
# Overlay a box over the detected face
|
76 |
-
cv2.putText(
|
77 |
-
cv2.FONT_HERSHEY_DUPLEX,
|
|
|
78 |
cv2.rectangle(frame, (fX, fY), (fX + fW, fY + fH),
|
79 |
(238, 164, 64), 2)
|
80 |
|
|
|
73 |
label = EMOTIONS[preds.argmax()]
|
74 |
|
75 |
# Overlay a box over the detected face
|
76 |
+
cv2.putText(frame_clone, label, (fX, fY - 10),
|
77 |
+
cv2.FONT_HERSHEY_DUPLEX, 0.5, (238, 164, 64), 1, cv2.LINE_AA)
|
78 |
+
|
79 |
cv2.rectangle(frame, (fX, fY), (fX + fW, fY + fH),
|
80 |
(238, 164, 64), 2)
|
81 |
|