Spaces:
Runtime error
Runtime error
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=[] | |
) | |