Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from PIL import Image
|
|
5 |
|
6 |
# Load Haar Cascade classifier
|
7 |
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml")
|
8 |
-
slider=gr.Slider(minimum=1,maximum=2,step=.1,label="Adjust the scale factor.")
|
9 |
# Face Detection Function
|
10 |
def detect_faces(image_np,slider):
|
11 |
img=np.array(gray_image)
|
@@ -24,7 +24,7 @@ def detect_faces(image_np,slider):
|
|
24 |
# Create Gradio Interface
|
25 |
iface = gr.Interface(
|
26 |
fn=detect_faces,
|
27 |
-
inputs=["image","
|
28 |
outputs="image",
|
29 |
title="Face Detection",
|
30 |
description="Upload an image, and the model will detect faces and draw bounding boxes around them."
|
|
|
5 |
|
6 |
# Load Haar Cascade classifier
|
7 |
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml")
|
8 |
+
# slider=gr.Slider(minimum=1,maximum=2,step=.1,label="Adjust the scale factor.")
|
9 |
# Face Detection Function
|
10 |
def detect_faces(image_np,slider):
|
11 |
img=np.array(gray_image)
|
|
|
24 |
# Create Gradio Interface
|
25 |
iface = gr.Interface(
|
26 |
fn=detect_faces,
|
27 |
+
inputs=["image",gr.Slider(minimum=1,maximum=2,step=.1,label="Adjust the scale factor.")],
|
28 |
outputs="image",
|
29 |
title="Face Detection",
|
30 |
description="Upload an image, and the model will detect faces and draw bounding boxes around them."
|