Update app.py
Browse files
app.py
CHANGED
@@ -30,8 +30,9 @@ def image_preprocess(image):
|
|
30 |
model = YOLO('best (1).pt')
|
31 |
|
32 |
def response(image):
|
33 |
-
res =
|
34 |
im_rgb = model(res)
|
|
|
35 |
return im_rgb
|
36 |
|
37 |
iface = gr.Interface(fn=response, inputs="image", outputs="image")
|
|
|
30 |
model = YOLO('best (1).pt')
|
31 |
|
32 |
def response(image):
|
33 |
+
res = Image.open(image)
|
34 |
im_rgb = model(res)
|
35 |
+
im_rgb = Image.fromarray(im_rgb)
|
36 |
return im_rgb
|
37 |
|
38 |
iface = gr.Interface(fn=response, inputs="image", outputs="image")
|