UNIQ-DEV/Image-Classification-Benchmark
0
1import re2 3def extract_image_urls(text):4 # Regular expression to match image URLs5 pattern = re.compile(r'https?://[^\s]+\.jpg|https?://[^\s]+\.jpeg|https?://[^\s]+\.png|https?://[^\s]+\.gif|https?://[^\s]+\.bmp|https?://[^\s]+\.webp')6 7 # Find all matches in the input text8 matches = pattern.findall(text)9 10 return matches