sahilbargotra commited on
Commit
b8f4048
·
verified ·
1 Parent(s): 1914749

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -16,7 +16,7 @@ def detect_faces(image_np,slider):
16
 
17
  # Draw rectangles around faces
18
  for (x, y, w, h) in faces:
19
- cv2.rectangle(image_np, (x, y), (x + w, y + h), (0, 0, 255), 4)
20
 
21
  return image_np, len(faces)
22
 
@@ -24,9 +24,9 @@ def detect_faces(image_np,slider):
24
  iface = gr.Interface(
25
  fn=detect_faces,
26
  inputs=["image",gr.Slider(minimum=1,maximum=2,step=.1,label= "adjust the scaleFactor")],
27
- outputs=["image",gr.Label("faces count")],
28
  title="Face Detection",
29
- description="Upload an image, and the model will detect faces and draw bounding boxes around them."
30
  )
31
 
32
  iface.launch()
 
16
 
17
  # Draw rectangles around faces
18
  for (x, y, w, h) in faces:
19
+ cv2.rectangle(image_np, (x, y), (x + w, y + h), (0, 0, 255), 3)
20
 
21
  return image_np, len(faces)
22
 
 
24
  iface = gr.Interface(
25
  fn=detect_faces,
26
  inputs=["image",gr.Slider(minimum=1,maximum=2,step=.1,label= "adjust the scaleFactor")],
27
+ outputs=["image",gr.Label("No Of Faces Detected")],
28
  title="Face Detection",
29
+ description="Upload an image, and the model will detect faces and draw blue boxes around them."
30
  )
31
 
32
  iface.launch()