k4d3 commited on
Commit
3830d24
1 Parent(s): 56166a4

remove a comment UwU

Browse files
Files changed (1) hide show
  1. joy +0 -4
joy CHANGED
@@ -351,10 +351,6 @@ class JoyCaptionModel:
351
  input_image, caption_type, caption_tone,
352
  caption_length, custom_prompt
353
  )
354
- # This regex checks if the caption contains at least one word character
355
- # and ends with a period, exclamation mark, or question mark.
356
- # \w matches any word character (letters, digits, or underscore)
357
- # caption[-1] checks the last character of the caption
358
  if re.search(r'\w', caption) and caption[-1] in {'.', '!', '?'}:
359
  return caption
360
  print("Generated caption is invalid. Retrying...")
 
351
  input_image, caption_type, caption_tone,
352
  caption_length, custom_prompt
353
  )
 
 
 
 
354
  if re.search(r'\w', caption) and caption[-1] in {'.', '!', '?'}:
355
  return caption
356
  print("Generated caption is invalid. Retrying...")