Zengyf-CVer's picture
app update
9a8e61c
raw
history blame contribute delete
523 Bytes
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, # 自动打开默认浏览器
)