Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,8 +19,9 @@ model = YOLO("best.pt") # load a custom model
|
|
19 |
def gradio_wrapper(img):
|
20 |
global model
|
21 |
#print(np.shape(img))
|
22 |
-
results = model(img
|
23 |
-
|
|
|
24 |
demo = gr.Interface(
|
25 |
gradio_wrapper,
|
26 |
#gr.Image(source="webcam", streaming=True, flip=True),
|
|
|
19 |
def gradio_wrapper(img):
|
20 |
global model
|
21 |
#print(np.shape(img))
|
22 |
+
results = model.predict(img) # predict on an image
|
23 |
+
|
24 |
+
return cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
25 |
demo = gr.Interface(
|
26 |
gradio_wrapper,
|
27 |
#gr.Image(source="webcam", streaming=True, flip=True),
|