GeorgeSherif commited on
Commit
cb7137d
·
1 Parent(s): 2fb86ad
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -41,7 +41,7 @@ def get_caption_for_image_id(image_path):
41
  Retrieve the caption for a given image_id from the JSON data.
42
  """
43
  # Extract the numeric part of the image ID
44
- match = re.search(r'(\d+)', image_path)
45
  if match:
46
  image_id = match.group(1).lstrip('0') # Remove leading zeros
47
  print("Searching for image_id:", image_id) # Debugging line
 
41
  Retrieve the caption for a given image_id from the JSON data.
42
  """
43
  # Extract the numeric part of the image ID
44
+ match = re.search(r'_(\d+)\.', image_path)
45
  if match:
46
  image_id = match.group(1).lstrip('0') # Remove leading zeros
47
  print("Searching for image_id:", image_id) # Debugging line