Spaces:
Runtime error
Runtime error
okaris
commited on
Commit
•
d77f48c
1
Parent(s):
aea139c
Fix image loading for gradio
Browse files
utils.py
CHANGED
@@ -68,12 +68,8 @@ def load_and_resize_image(image_path, max_width, max_height, maintain_aspect_rat
|
|
68 |
"""
|
69 |
|
70 |
# Open the image
|
71 |
-
print(type(image_path))
|
72 |
if isinstance(image_path, np.ndarray):
|
73 |
-
|
74 |
-
else:
|
75 |
-
#Print the type of image_path
|
76 |
-
print(type(image_path))
|
77 |
|
78 |
image = load_image(image_path)
|
79 |
|
|
|
68 |
"""
|
69 |
|
70 |
# Open the image
|
|
|
71 |
if isinstance(image_path, np.ndarray):
|
72 |
+
image_path = Image.fromarray(image_path)
|
|
|
|
|
|
|
73 |
|
74 |
image = load_image(image_path)
|
75 |
|