cover uppercase links

This commit is contained in:
Sefik Ilkin Serengil 2024-03-08 12:01:45 +00:00
parent 07a2d5bf62
commit 2f9f9761d0

View File

@ -34,7 +34,7 @@ def load_image(img: Union[str, np.ndarray]) -> Tuple[np.ndarray, str]:
return load_base64(img), "base64 encoded string"
# The image is a url
if img.startswith("http://") or img.startswith("https://"):
if img.lower().startswith("http://") or img.lower().startswith("https://"):
return load_image_from_web(url=img), img
# The image is a path