bedead commited on
Commit
45c2198
·
verified ·
1 Parent(s): 46be095

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -32,7 +32,7 @@ def dilate_mask(mask, kernel_size=5, iterations=5):
32
  return Image.fromarray(mask)
33
 
34
  def remove_obj(image, seed):
35
- alpha_channel = img["layers"][0][:, :, 3]
36
  mask = np.where(alpha_channel == 0, 0, 255).astype(np.uint8)
37
  uploaded_mask = Image.fromarray(mask)
38
  background = Image.fromarray(img["background"])
@@ -93,4 +93,4 @@ with gr.Blocks(theme="gradio/monochrome") as demo:
93
 
94
 
95
 
96
- demo.launch()
 
32
  return Image.fromarray(mask)
33
 
34
  def remove_obj(image, seed):
35
+ alpha_channel = image["layers"][0][:, :, 3]
36
  mask = np.where(alpha_channel == 0, 0, 255).astype(np.uint8)
37
  uploaded_mask = Image.fromarray(mask)
38
  background = Image.fromarray(img["background"])
 
93
 
94
 
95
 
96
+ demo.launch(share=True)