radames commited on
Commit
bfe7523
1 Parent(s): c0ca149

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +2 -2
pipeline.py CHANGED
@@ -48,8 +48,8 @@ class PreTrainedPipeline():
48
  # decode base64 image to PIL
49
  image = Image.open(
50
  BytesIO(base64.b64decode(inputs))).convert("RGB")
51
- elif isinstance(inputs, Image.Image):
52
- image = inputs.convert("RGB")
53
 
54
  image = self.transform(image).unsqueeze(0).to(device)
55
 
 
48
  # decode base64 image to PIL
49
  image = Image.open(
50
  BytesIO(base64.b64decode(inputs))).convert("RGB")
51
+ elif isinstance(inputs, "Image.Image"):
52
+ image = Image.open(inputs).convert("RGB")
53
 
54
  image = self.transform(image).unsqueeze(0).to(device)
55