Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import paddlehub as hub
|
|
5 |
|
6 |
model = hub.Module(name='U2Net')
|
7 |
|
|
|
8 |
def inference(img):
|
9 |
result = model.Segmentation(
|
10 |
images=[cv2.imread(img)],
|
@@ -21,4 +22,4 @@ title="u2Net"
|
|
21 |
description="U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection"
|
22 |
|
23 |
examples=[['cat2.jpg']]
|
24 |
-
gr.Interface(inference,gr.inputs.Image(type="filepath"),"label",title=title,description=description,examples=examples).launch(enable_queue=True
|
|
|
5 |
|
6 |
model = hub.Module(name='U2Net')
|
7 |
|
8 |
+
|
9 |
def inference(img):
|
10 |
result = model.Segmentation(
|
11 |
images=[cv2.imread(img)],
|
|
|
22 |
description="U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection"
|
23 |
|
24 |
examples=[['cat2.jpg']]
|
25 |
+
gr.Interface(inference,gr.inputs.Image(type="filepath"),"label",title=title,description=description,examples=examples).launch(enable_queue=True)
|