Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,8 @@ def load_mask_ui(input_folder="example_tmp",load_edit = False):
|
|
49 |
return mask_np_list, mask_label_list
|
50 |
|
51 |
def load_image_ui(load_edit, input_folder="example_tmp"):
|
52 |
-
try:
|
|
|
53 |
for img_path in Path(input_folder).iterdir():
|
54 |
if img_path.name in ["img_512.png"]:
|
55 |
image = Image.open(img_path)
|
@@ -60,9 +61,9 @@ def load_image_ui(load_edit, input_folder="example_tmp"):
|
|
60 |
max_val = len(mask_np_list)-1
|
61 |
sliderup = gr.Slider(value = 0, minimum=0, maximum=max_val, step=1, interactive=True)
|
62 |
return image, segmentation, mask_np_list, mask_label_list, image, sliderup, sliderup
|
63 |
-
except:
|
64 |
-
|
65 |
-
|
66 |
|
67 |
|
68 |
|
|
|
49 |
return mask_np_list, mask_label_list
|
50 |
|
51 |
def load_image_ui(load_edit, input_folder="example_tmp"):
|
52 |
+
#try:
|
53 |
+
if 1:
|
54 |
for img_path in Path(input_folder).iterdir():
|
55 |
if img_path.name in ["img_512.png"]:
|
56 |
image = Image.open(img_path)
|
|
|
61 |
max_val = len(mask_np_list)-1
|
62 |
sliderup = gr.Slider(value = 0, minimum=0, maximum=max_val, step=1, interactive=True)
|
63 |
return image, segmentation, mask_np_list, mask_label_list, image, sliderup, sliderup
|
64 |
+
#except:
|
65 |
+
# print("Image folder invalid: The folder should contain image.png")
|
66 |
+
# return None, None, None, None, None, None
|
67 |
|
68 |
|
69 |
|