LapStore commited on
Commit
4d35f36
·
1 Parent(s): c743be2

modified error in reporting unexpeced backgroundimage

Browse files
Files changed (1) hide show
  1. server.py +1 -1
server.py CHANGED
@@ -61,7 +61,7 @@ class SegmenterBackground():
61
  elif(background_image=="remove"):
62
  outpt=np.zeros_like(raw_image)
63
  print("remove effect")
64
- elif (type(background_image)==PIL.Image.Image ): # not PIL.JpegImagePlugin.JpegImageFile as resized
65
  #make it last case to not always give replace when uploading same image e.g. as in app , this is easiest way to modify server
66
  #,may be clened in other version
67
  outpt = np.array(background_image.copy())
 
61
  elif(background_image=="remove"):
62
  outpt=np.zeros_like(raw_image)
63
  print("remove effect")
64
+ elif isinstance(background_image, PIL.Image.Image):#(type(background_image)==PIL.Image.Image ): # not PIL.JpegImagePlugin.JpegImageFile as resized
65
  #make it last case to not always give replace when uploading same image e.g. as in app , this is easiest way to modify server
66
  #,may be clened in other version
67
  outpt = np.array(background_image.copy())