Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,6 @@ model.agnostic = False # NMS class-agnostic
|
|
13 |
model.multi_label = False # NMS multiple labels per box
|
14 |
model.max_det = 1000 # maximum number of detections per image
|
15 |
|
16 |
-
# set image
|
17 |
-
img = '/content/apple_img.jpg'
|
18 |
|
19 |
def detect(img):
|
20 |
|
@@ -31,8 +29,8 @@ def detect(img):
|
|
31 |
return results
|
32 |
# show detection bounding boxes on image
|
33 |
|
34 |
-
|
35 |
-
|
36 |
|
37 |
intf = gr.Interface(fn=detect, inputs=img, outputs=image)
|
38 |
intf.launch(inline=False)
|
|
|
13 |
model.multi_label = False # NMS multiple labels per box
|
14 |
model.max_det = 1000 # maximum number of detections per image
|
15 |
|
|
|
|
|
16 |
|
17 |
def detect(img):
|
18 |
|
|
|
29 |
return results
|
30 |
# show detection bounding boxes on image
|
31 |
|
32 |
+
img = gr.inputs.Image(shape=(192, 192))
|
33 |
+
image = gr.outputs.Image(shape=(192, 192))
|
34 |
|
35 |
intf = gr.Interface(fn=detect, inputs=img, outputs=image)
|
36 |
intf.launch(inline=False)
|