florentgbelidji HF Staff commited on
Commit
2ac6664
·
1 Parent(s): a338bba

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +1 -1
pipeline.py CHANGED
@@ -46,7 +46,7 @@ class PreTrainedPipeline():
46
  parameters = data.pop("parameters", {})
47
 
48
  # decode base64 image to PIL
49
- image = Image.open(BytesIO(base64.b64decode(image))
50
  image = self.transform(image).unsqueeze(0).to(device)
51
  with torch.no_grad():
52
  caption = self.model.generate(
 
46
  parameters = data.pop("parameters", {})
47
 
48
  # decode base64 image to PIL
49
+ image = Image.open(BytesIO(base64.b64decode(image)))
50
  image = self.transform(image).unsqueeze(0).to(device)
51
  with torch.no_grad():
52
  caption = self.model.generate(