Fix mistake in ImageCaption.parse

This commit is contained in:
Joel Holdbrooks 2023-01-23 00:14:50 -08:00
parent 4e6c5f4d00
commit 0cf2cd71de
1 changed files with 1 additions and 1 deletions

View File

@ -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: