Spaces:
Runtime error
Runtime error
import gradio as gr | |
def yolo_det_img(img): | |
return img | |
inputs_img = gr.Image(image_mode="RGB", source="upload", tool="editor", type="pil", label="原始图片") | |
outputs_img = gr.Image(type="pil", label="检测图片") | |
examples_img = [["./img_examples/bus.jpg"]] | |
gyd_img = gr.Interface( | |
fn=yolo_det_img, | |
inputs=inputs_img, | |
outputs=outputs_img, | |
examples=examples_img, | |
flagging_dir="run", # 输出目录 | |
) | |
gyd_img.launch( | |
inbrowser=True, # 自动打开默认浏览器 | |
) |