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

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +1 -5
pipeline.py CHANGED
@@ -34,8 +34,4 @@ class PreTrainedPipeline():
34
 
35
  # Ugly hack, I'm sure there's a better way of doing what I want.
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()
 
34
 
35
  # Ugly hack, I'm sure there's a better way of doing what I want.
36
  img = transforms.ToPILImage()(output[0])
37
+ return img