akhaliq HF staff commited on
Commit
76f9bf9
1 Parent(s): 9343ff4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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,cache_examples=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)