pushpinder06 commited on
Commit
041ba6d
·
verified ·
1 Parent(s): b3f30d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,7 +13,7 @@ def detect_faces(image_np,slider):
13
  gray_image = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
14
 
15
  # Detect faces
16
- faces = face_cascade.detectMultiScale(gray_image, scaleFactor=]slider, minNeighbors=5, minSize=(30, 30))
17
 
18
  # Draw rectangles around faces
19
  for (x, y, w, h) in faces:
@@ -24,7 +24,7 @@ slider=gr.Slider(minimum=1,maximum=2,step=.1,label="Adjust the scale factor.")
24
  # Create Gradio Interface
25
  iface = gr.Interface(
26
  fn=detect_faces,
27
- inputs=["image","slider"]
28
  outputs="image",
29
  title="Face Detection",
30
  description="Upload an image, and the model will detect faces and draw bounding boxes around them."
 
13
  gray_image = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
14
 
15
  # Detect faces
16
+ faces = face_cascade.detectMultiScale(gray_image, scaleFactor=slider, minNeighbors=5, minSize=(30, 30))
17
 
18
  # Draw rectangles around faces
19
  for (x, y, w, h) in faces:
 
24
  # Create Gradio Interface
25
  iface = gr.Interface(
26
  fn=detect_faces,
27
+ inputs=["image","slider"],
28
  outputs="image",
29
  title="Face Detection",
30
  description="Upload an image, and the model will detect faces and draw bounding boxes around them."