Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -52,6 +52,8 @@ if img_file_buffer is not None:
|
|
52 |
# show the name on image to user
|
53 |
y1, x2, y2, x1 = faceLoc
|
54 |
y1, x2, y2, x1 = y1 * 4, x2 * 4, y2 * 4, x1 * 4
|
|
|
|
|
55 |
cv2.rectangle(image , (x1, y1), (x2, y2), (0, 255, 0), 2)
|
56 |
#cv2.rectangle(image , (x1, y2 - 35), (x2, y2), (0, 255, 0), cv2.FILLED)
|
57 |
#cv2.putText(image , name, (x1 + 6, y2 - 6), cv2.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255), 2)
|
|
|
52 |
# show the name on image to user
|
53 |
y1, x2, y2, x1 = faceLoc
|
54 |
y1, x2, y2, x1 = y1 * 4, x2 * 4, y2 * 4, x1 * 4
|
55 |
+
if not image.flags.writeable:
|
56 |
+
image.setflags(write=True)
|
57 |
cv2.rectangle(image , (x1, y1), (x2, y2), (0, 255, 0), 2)
|
58 |
#cv2.rectangle(image , (x1, y2 - 35), (x2, y2), (0, 255, 0), cv2.FILLED)
|
59 |
#cv2.putText(image , name, (x1 + 6, y2 - 6), cv2.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255), 2)
|