not-lain commited on
Commit
5fb3d3c
·
1 Parent(s): 6c5427b

fix mask creation

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -42,7 +42,11 @@ def prepare_image_and_mask(
42
  fill="white",
43
  )
44
  mask = Image.new("RGB", image.size, "black")
45
- mask = ImageOps.expand(mask, border=(0, 20, 0, 0), fill="white")
 
 
 
 
46
  return background, mask
47
 
48
 
 
42
  fill="white",
43
  )
44
  mask = Image.new("RGB", image.size, "black")
45
+ mask = ImageOps.expand(
46
+ mask,
47
+ border=(padding_left, padding_top, padding_right, padding_bottom),
48
+ fill="white",
49
+ )
50
  return background, mask
51
 
52