m7mdal7aj commited on
Commit
aefece3
1 Parent(s): 5af8c0c

Update my_model/captioner/image_captioning.py

Browse files
my_model/captioner/image_captioning.py CHANGED
@@ -66,7 +66,7 @@ class ImageCaptioningModel:
66
 
67
  def generate_caption(self, image_path):
68
 
69
- if isinstance(image, str) or isinstance(image, io.IOBase):
70
  # If it's a file path or file-like object, open it as a PIL Image
71
  image = Image.open(image_path)
72
 
 
66
 
67
  def generate_caption(self, image_path):
68
 
69
+ if isinstance(image_path, str) or isinstance(image_path, io.IOBase):
70
  # If it's a file path or file-like object, open it as a PIL Image
71
  image = Image.open(image_path)
72