23A475R commited on
Commit
caca981
1 Parent(s): 320484d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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(frame, label, (fX, fY + 100),
77
- cv2.FONT_HERSHEY_DUPLEX, 1, (238, 164, 64), 1)
 
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