Akjava commited on
Commit
ba18265
1 Parent(s): c3ff188

add size check

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -35,7 +35,7 @@ def process_images(image, image2=None,inpaint_radius=3,blur_radius=25,edge_expan
35
  img_width,img_height = image["background"].size
36
  mask_width, mask_height = mask.size
37
  if img_width!=mask_width or img_height!=mask_height:
38
- gr.Error(f"image size({img_width},{img_height}) must be same as mask size({mask_width},{mask_height})")
39
  else:
40
  pass
41
  print("size ok")
 
35
  img_width,img_height = image["background"].size
36
  mask_width, mask_height = mask.size
37
  if img_width!=mask_width or img_height!=mask_height:
38
+ raise gr.Error(f"image size({img_width},{img_height}) must be same as mask size({mask_width},{mask_height})")
39
  else:
40
  pass
41
  print("size ok")