tomaseo2022 commited on
Commit
6b3f326
Β·
1 Parent(s): c5d03b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -15,7 +15,9 @@ from rembg import remove
15
  def remove_background(img):
16
  img = Image.open(img)
17
  img = rembg.remove(img)
18
- return img
 
 
19
 
20
  def inference(img):
21
  output = remove_background(img)
@@ -27,6 +29,11 @@ def inference(img):
27
  cv2.drawContours(silhouette, contours, -1, (255, 255, 255), 1)
28
  return silhouette
29
 
 
 
 
 
 
30
  gr.Interface(
31
  inference,
32
  gr.inputs.Image(type="filepath", label="Input"),
 
15
  def remove_background(img):
16
  img = Image.open(img)
17
  img = rembg.remove(img)
18
+ output = remove(input_img[:, :, [2,1,0]])
19
+ return output
20
+
21
 
22
  def inference(img):
23
  output = remove_background(img)
 
29
  cv2.drawContours(silhouette, contours, -1, (255, 255, 255), 1)
30
  return silhouette
31
 
32
+
33
+
34
+
35
+
36
+
37
  gr.Interface(
38
  inference,
39
  gr.inputs.Image(type="filepath", label="Input"),