Fix mistake in ImageCaption.parse
This commit is contained in:
parent
4e6c5f4d00
commit
0cf2cd71de
|
@ -137,7 +137,7 @@ class ImageCaption:
|
|||
"""
|
||||
(file_name, _) = os.path.splitext(os.path.basename(file_path))
|
||||
caption = file_name.split("_")[0]
|
||||
return ImageCaption(caption, 1.0, [], [], DEFAULT_MAX_CAPTION_LENGTH, False)
|
||||
return ImageCaption.parse(caption)
|
||||
|
||||
@staticmethod
|
||||
def from_text_file(file_path: str, default_caption: OptionalImageCaption=None) -> OptionalImageCaption:
|
||||
|
|
Loading…
Reference in New Issue