mod5-gen20 / app.py
fernandobarranco's picture
Update app.py
aef54aa verified
raw
history blame contribute delete
482 Bytes
import cv2
import numpy as np
import gradio as gr
from ultralytics import YOLO
def predict(path:str):
model = YOLO("yolov8s.yaml")
model = YOLO("best-carvana.pt")
imagen = cv2.imread(path)
results = model.predict(source=path)
for r in results:
return r.plot()
gr.Interface(fn=predict,
inputs=gr.components.Image(type="filepath", label="Input"),
outputs=gr.components.Image(type="numpy", label="Output")).launch(debug=True)