osanseviero HF staff commited on
Commit
b5c7efb
1 Parent(s): abc03b4

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +1 -0
pipeline.py CHANGED
@@ -36,5 +36,6 @@ class PreTrainedPipeline():
36
  img = transforms.ToPILImage()(output[0])
37
  buffer = io.BytesIO()
38
  img.save(buffer, format="JPEG")
 
39
 
40
  return buffer.getvalue()
 
36
  img = transforms.ToPILImage()(output[0])
37
  buffer = io.BytesIO()
38
  img.save(buffer, format="JPEG")
39
+ buffer.seek(0)
40
 
41
  return buffer.getvalue()