Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,11 +72,11 @@ def process_input_image(image_source, download_masks=False):
|
|
| 72 |
predicted_image = predicted_image[0, :, :]
|
| 73 |
rgb_image = label_to_rgb(predicted_image)
|
| 74 |
|
|
|
|
| 75 |
if download_masks:
|
| 76 |
-
mask_zip, output_name = create_mask_zip(predicted_image)
|
| 77 |
return "Predicted Masked Image", rgb_image, mask_zip, output_name
|
| 78 |
else:
|
| 79 |
-
return "Predicted Masked Image", rgb_image
|
| 80 |
|
| 81 |
|
| 82 |
my_app = gr.Blocks()
|
|
@@ -150,6 +150,7 @@ with my_app:
|
|
| 150 |
output_label,
|
| 151 |
img_output,
|
| 152 |
masks_zip,
|
| 153 |
-
]
|
|
|
|
| 154 |
)
|
| 155 |
my_app.launch(debug=True)
|
|
|
|
| 72 |
predicted_image = predicted_image[0, :, :]
|
| 73 |
rgb_image = label_to_rgb(predicted_image)
|
| 74 |
|
| 75 |
+
mask_zip, output_name = create_mask_zip(predicted_image)
|
| 76 |
if download_masks:
|
|
|
|
| 77 |
return "Predicted Masked Image", rgb_image, mask_zip, output_name
|
| 78 |
else:
|
| 79 |
+
return "Predicted Masked Image", rgb_image, None, None
|
| 80 |
|
| 81 |
|
| 82 |
my_app = gr.Blocks()
|
|
|
|
| 150 |
output_label,
|
| 151 |
img_output,
|
| 152 |
masks_zip,
|
| 153 |
+
],
|
| 154 |
+
show_hidden_outputs=True
|
| 155 |
)
|
| 156 |
my_app.launch(debug=True)
|