eat the new lines
Browse files
joy
CHANGED
@@ -546,6 +546,9 @@ def main():
|
|
546 |
if args.add_commas_to_sentence_ends:
|
547 |
caption = re.sub(r"(\.)(\s+)([A-Z])", r"\1,\2\3", caption)
|
548 |
|
|
|
|
|
|
|
549 |
print(f"Caption for {image_path}:\n\n{caption}\n\n")
|
550 |
|
551 |
# Save the caption to a .caption file
|
|
|
546 |
if args.add_commas_to_sentence_ends:
|
547 |
caption = re.sub(r"(\.)(\s+)([A-Z])", r"\1,\2\3", caption)
|
548 |
|
549 |
+
# Remove all newline characters
|
550 |
+
caption = caption.replace("\n", " ")
|
551 |
+
|
552 |
print(f"Caption for {image_path}:\n\n{caption}\n\n")
|
553 |
|
554 |
# Save the caption to a .caption file
|