sarwansingh commited on
Commit
5ca6adb
1 Parent(s): 5b98964

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -59,11 +59,11 @@ if file_name is not None:
59
 
60
  y1, x2, y2, x1 = faceLoc
61
  y1, x2, y2, x1 = (y1 * 4), (x2 * 4), (y2 * 4) ,(x1 * 4)
62
- cv2.rectangle(image, (x1, y1), (x2, y2), (0, 255, 0), 2)
63
- cv2.rectangle(image, (x1, y2 - 35), (x2, y2), (0, 255, 0), cv2.FILLED)
64
- cv2.putText(image, name, (x1 + 6, y2 - 6), cv2.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255), 2)
65
 
66
- st.image(image, use_column_width=True, output_format="PNG")
67
  else:
68
  st.warning("No faces detected in the image. Face recognition failed.")
69
 
 
59
 
60
  y1, x2, y2, x1 = faceLoc
61
  y1, x2, y2, x1 = (y1 * 4), (x2 * 4), (y2 * 4) ,(x1 * 4)
62
+ cv2.rectangle(test_image , (x1, y1), (x2, y2), (0, 255, 0), 2)
63
+ cv2.rectangle(test_image , (x1, y2 - 35), (x2, y2), (0, 255, 0), cv2.FILLED)
64
+ cv2.putText(test_image , name, (x1 + 6, y2 - 6), cv2.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255), 2)
65
 
66
+ st.image(test_image , use_column_width=True, output_format="PNG")
67
  else:
68
  st.warning("No faces detected in the image. Face recognition failed.")
69