Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -77,6 +77,7 @@ if file_name is not None:
|
|
77 |
# Draw rectangle around the face
|
78 |
y1, x2, y2, x1 = faceLoc
|
79 |
y1, x2, y2, x1 = (y1 * 4), (x2 * 4), (y2 * 4) ,(x1 * 4)
|
|
|
80 |
cv2.rectangle(image, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
81 |
cv2.putText(image, name, (x1 + 6, y2 - 6), cv2.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255), 2)
|
82 |
|
|
|
77 |
# Draw rectangle around the face
|
78 |
y1, x2, y2, x1 = faceLoc
|
79 |
y1, x2, y2, x1 = (y1 * 4), (x2 * 4), (y2 * 4) ,(x1 * 4)
|
80 |
+
image = image.copy()
|
81 |
cv2.rectangle(image, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
82 |
cv2.putText(image, name, (x1 + 6, y2 - 6), cv2.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255), 2)
|
83 |
|