Update app.py
Browse files
app.py
CHANGED
@@ -170,9 +170,9 @@ def main_function(plan_name, uploaded_file, interference = True, aps_int = 0, ap
|
|
170 |
plan_image = np.array(Image.open(uploaded_file.name))/255
|
171 |
|
172 |
dimensiones = plan_image.shape
|
173 |
-
if dimensiones
|
174 |
# raise gradio.Error("Error in dimensions of the uploaded image. Must [256,256,3] π£π.", duration=5)
|
175 |
-
raise ValueError("Error in image size. Must [256,256
|
176 |
|
177 |
plan_grayscale = plan_image[:, :, 0]
|
178 |
plan_in = 1 - plan_grayscale
|
|
|
170 |
plan_image = np.array(Image.open(uploaded_file.name))/255
|
171 |
|
172 |
dimensiones = plan_image.shape
|
173 |
+
if len(dimensiones) > 2:
|
174 |
# raise gradio.Error("Error in dimensions of the uploaded image. Must [256,256,3] π£π.", duration=5)
|
175 |
+
raise ValueError("Error in image size. Must [256,256].")
|
176 |
|
177 |
plan_grayscale = plan_image[:, :, 0]
|
178 |
plan_in = 1 - plan_grayscale
|