not-lain commited on
Commit
d61a499
β€’
1 Parent(s): ed03ade

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -23,6 +23,8 @@ transform_image = transforms.Compose(
23
 
24
  @spaces.GPU
25
  def fn(image):
 
 
26
  im = load_img(image, output_type="pil")
27
  im = im.convert("RGB")
28
  image_size = im.size
 
23
 
24
  @spaces.GPU
25
  def fn(image):
26
+ if image == None :
27
+ return (None,None)
28
  im = load_img(image, output_type="pil")
29
  im = im.convert("RGB")
30
  image_size = im.size