fernandobarranco commited on
Commit
f7325a3
·
verified ·
1 Parent(s): c41e0cc

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ def predict(path:str):
2
+ model = YOLO("yolov8s.yaml")
3
+ model = YOLO("best-carvana.pt")
4
+ imagen = cv2.imread(path)
5
+ results = model.predict(source=path)
6
+
7
+ for r in results:
8
+ return r.plot()
9
+
10
+
11
+ gr.Interface(fn=predict,
12
+ inputs=gr.components.Image(type="filepath", label="Input"),
13
+ outputs=gr.components.Image(type="numpy", label="Output")).launch(debug=True)