Spaces:
Sleeping
Sleeping
File size: 634 Bytes
3a63794 4d5b0bf 3a63794 4d5b0bf 3a63794 4d5b0bf 3a63794 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import gradio as gr
from utilities.constants import FW_DEFAULT_OPTION
from controllers.fd import fd_controller
from services.state import get_state
def fd_interface():
return gr.Interface(
title="Face Detection",
fn=lambda image, color: fd_controller(
image, color, get_state('fw_option', FW_DEFAULT_OPTION)),
inputs=[
gr.Image(type="pil", label="Input Image"),
gr.ColorPicker(label="Box Color")
],
outputs=[
gr.Image(type="pil", label="Output Image"),
gr.JSON(label="Output Boxes")
],
flagging_options=[]
)
|