sdafd commited on
Commit
4aa3d02
1 Parent(s): d67c485

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,13 +17,13 @@ def detect_faces(image):
17
  x, y, width, height = face['box']
18
  cv2.rectangle(image, (x, y), (x + width, y + height), (255, 0, 0), 2)
19
 
20
- return image
21
 
22
  # Gradio Interface
23
  iface = gr.Interface(
24
  fn=detect_faces,
25
  inputs=gr.Image(type="numpy", label="Input Image"),
26
- outputs=gr.Image(type="numpy", label="Output Image"),
27
  live=True,
28
  title="MTCNN Face Detection",
29
  description="Detect faces in an image using MTCNN.",
 
17
  x, y, width, height = face['box']
18
  cv2.rectangle(image, (x, y), (x + width, y + height), (255, 0, 0), 2)
19
 
20
+ return image, faces
21
 
22
  # Gradio Interface
23
  iface = gr.Interface(
24
  fn=detect_faces,
25
  inputs=gr.Image(type="numpy", label="Input Image"),
26
+ outputs=[gr.Image(type="numpy", label="Output Image"), gr.Textbox(label="Face Coordinates")],
27
  live=True,
28
  title="MTCNN Face Detection",
29
  description="Detect faces in an image using MTCNN.",