fffiloni commited on
Commit
55e712f
1 Parent(s): 9738ed3

regex expression changed

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -35,7 +35,7 @@ def get_caption(image_in):
35
  #print(full_sentence)
36
 
37
  # Find the pattern matching the expected format ("Describe this image in detail:" followed by optional space and then the rest)...
38
- pattern = r'(?<=Describe this image in detail:\s*)(.*)$'
39
  # Apply the regex pattern to extract the description text.
40
  match = re.search(pattern, full_sentence)
41
  if match:
 
35
  #print(full_sentence)
36
 
37
  # Find the pattern matching the expected format ("Describe this image in detail:" followed by optional space and then the rest)...
38
+ pattern = r'^Describe this image in detail:\s*(.*)$'
39
  # Apply the regex pattern to extract the description text.
40
  match = re.search(pattern, full_sentence)
41
  if match: