Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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)
|