Spaces:
Runtime error
Runtime error
File size: 523 Bytes
9a8e61c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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, # 自动打开默认浏览器
) |