Fix comparison against multiple values

This commit is contained in:
Jeroen Van Goey 2021-11-15 10:42:26 +01:00 committed by GitHub
parent 89df017c87
commit 72df9dfa3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -760,7 +760,7 @@ class Image(InputComponent):
return processing_utils.encode_url_or_file_to_base64(x)
elif self.type == "file":
return processing_utils.encode_url_or_file_to_base64(x.name)
elif self.type == "numpy" or "pil":
elif self.type in ("numpy", "pil"):
if self.type == "numpy":
x = PIL.Image.fromarray(np.uint8(x)).convert('RGB')
fmt = x.format