Spaces:
Paused
Paused
File size: 550 Bytes
99ac2ba e35a5a5 99ac2ba 0e164bc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio as gr
import PIL.Image as Image
from ultralytics import YOLO
model = YOLO('./models/best.pt')
def infer(img_path):
results = model(img_path)
im_array = results[0].plot()
im = Image.fromarray(im_array[..., ::-1])
return im
article = "**์ด๋ฏธ์ง๋ฅผ ์
๋ก๋ํ์ธ์.**" \
demo = gr.Interface(fn=infer,
inputs=gr.Image(type="numpy", label="Input Image"),
outputs=gr.Image(type="pil", label="Result")
# examples=[image_path,]
)
demo.launch() |