Spaces:
Running
on
Zero
Running
on
Zero
debug.py
CHANGED
@@ -44,8 +44,8 @@ def save_image(image_id, image_path: Image.Image) -> None:
|
|
44 |
try:
|
45 |
# print("Image path: " + image_path)
|
46 |
print("Type: " + str(type(image_path)))
|
47 |
-
with
|
48 |
-
img = Image.
|
49 |
img = img.convert("P", palette=Image.ADAPTIVE, colors=256)
|
50 |
img.save(save_image_path)
|
51 |
|
|
|
44 |
try:
|
45 |
# print("Image path: " + image_path)
|
46 |
print("Type: " + str(type(image_path)))
|
47 |
+
with load_image(image_path) as img:
|
48 |
+
img = Image.Image.load(img)
|
49 |
img = img.convert("P", palette=Image.ADAPTIVE, colors=256)
|
50 |
img.save(save_image_path)
|
51 |
|