Testys commited on
Commit
e66ee6d
1 Parent(s): cb816fd
Files changed (1) hide show
  1. utils/caption_utils.py +1 -1
utils/caption_utils.py CHANGED
@@ -16,7 +16,7 @@ class ImageCaptioning:
16
  def get_caption(self, image):
17
 
18
  # Preprocessing the Image
19
- img = Image.open(io.ByteIO(image))
20
  img = self.processor(img, return_tensors="pt").to(device)
21
 
22
  # Generating captions
 
16
  def get_caption(self, image):
17
 
18
  # Preprocessing the Image
19
+ img = Image.open(io.BytesIO(image))
20
  img = self.processor(img, return_tensors="pt").to(device)
21
 
22
  # Generating captions