Spaces:
Build error
Build error
Update main.py
Browse files
main.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import dlib
|
| 3 |
import cv2
|
| 4 |
-
import numpy as np
|
| 5 |
|
| 6 |
# Load the pre-trained face detector and facial landmarks predictor
|
| 7 |
detector = dlib.get_frontal_face_detector()
|
|
@@ -34,5 +34,5 @@ def detect_eyes(image):
|
|
| 34 |
_, buffer = cv2.imencode('.jpg', image)
|
| 35 |
return buffer.tobytes()
|
| 36 |
|
| 37 |
-
iface = gr.Interface(fn=detect_eyes, inputs=gr.Image(), outputs=gr.Image())
|
| 38 |
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import dlib
|
| 3 |
import cv2
|
| 4 |
+
import numpy as np
|
| 5 |
|
| 6 |
# Load the pre-trained face detector and facial landmarks predictor
|
| 7 |
detector = dlib.get_frontal_face_detector()
|
|
|
|
| 34 |
_, buffer = cv2.imencode('.jpg', image)
|
| 35 |
return buffer.tobytes()
|
| 36 |
|
| 37 |
+
iface = gr.Interface(fn=detect_eyes, inputs=gr.inputs.Image(), outputs=gr.outputs.Image())
|
| 38 |
iface.launch()
|