Adding a default image_url
Browse files- utils/image_utils.py +1 -1
utils/image_utils.py
CHANGED
@@ -15,7 +15,7 @@ def check_url(string):
|
|
15 |
|
16 |
# Load an image
|
17 |
def load_image(image_path):
|
18 |
-
if check_url(image_path):
|
19 |
return Image.open(requests.get(image_path, stream=True).raw)
|
20 |
elif os.path.exists(image_path):
|
21 |
return Image.open(image_path)
|
|
|
15 |
|
16 |
# Load an image
|
17 |
def load_image(image_path):
|
18 |
+
if check_url(image_path="https://images.unsplash.com/photo-1532635236-d50c8592eb08?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1411&q=80"):
|
19 |
return Image.open(requests.get(image_path, stream=True).raw)
|
20 |
elif os.path.exists(image_path):
|
21 |
return Image.open(image_path)
|