Spaces:
Runtime error
Runtime error
Commit
·
89c0b05
1
Parent(s):
415c3de
change text color
Browse files
app.py
CHANGED
@@ -33,10 +33,10 @@ def predict_emotion(frame):
|
|
33 |
cv2.putText(frame, emotion, (x, y - 10), cv2.FONT_HERSHEY_SIMPLEX, 1, (128, 128, 0), 2)
|
34 |
cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 0, 0), 2)
|
35 |
else:
|
36 |
-
cv2.putText(frame, low_confidence_alert, (x, y - 10), cv2.FONT_HERSHEY_SIMPLEX, 1, (0,
|
37 |
2)
|
38 |
else:
|
39 |
-
cv2.putText(frame, no_face_detection_alert, (x, y - 10), cv2.FONT_HERSHEY_SIMPLEX, 1, (0,
|
40 |
|
41 |
return frame
|
42 |
|
|
|
33 |
cv2.putText(frame, emotion, (x, y - 10), cv2.FONT_HERSHEY_SIMPLEX, 1, (128, 128, 0), 2)
|
34 |
cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 0, 0), 2)
|
35 |
else:
|
36 |
+
cv2.putText(frame, low_confidence_alert, (x, y - 10), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0),
|
37 |
2)
|
38 |
else:
|
39 |
+
cv2.putText(frame, no_face_detection_alert, (x, y - 10), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)
|
40 |
|
41 |
return frame
|
42 |
|