Spaces:
Build error
Build error
Fix truncation
Browse files- fromage/utils.py +1 -1
fromage/utils.py
CHANGED
@@ -32,7 +32,7 @@ def get_image_from_url(url: str):
|
|
32 |
|
33 |
def truncate_caption(caption: str) -> str:
|
34 |
"""Truncate captions at periods and newlines."""
|
35 |
-
caption = caption.strip()
|
36 |
trunc_index = caption.find('\n') + 1
|
37 |
if trunc_index <= 0:
|
38 |
trunc_index = caption.find('.') + 1
|
|
|
32 |
|
33 |
def truncate_caption(caption: str) -> str:
|
34 |
"""Truncate captions at periods and newlines."""
|
35 |
+
caption = caption.strip('\n')
|
36 |
trunc_index = caption.find('\n') + 1
|
37 |
if trunc_index <= 0:
|
38 |
trunc_index = caption.find('.') + 1
|