P-ID_Detection / app.py
brian25's picture
Update app.py
e307b4d verified
raw
history blame
267 Bytes
import gradio as gr
from ultralytics import YOLO
model = YOLO("best.pt")
def greet(source):
result = model(source) # return a list of Results objects
return result.show()
demo = gr.Interface(fn=greet, inputs="image", outputs="image")
demo.launch()