Just s
Browse files- 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.
|
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
|