Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def load_plan_vi(mapa_seleccionado, uploaded_file):
|
|
37 |
if mapa_seleccionado == "Upload your own image" and uploaded_file is not None:
|
38 |
plan_image = Image.open(uploaded_file.name)
|
39 |
elif mapa_seleccionado == "Upload your own image" and uploaded_file is None:
|
40 |
-
raise gradio.Warning("Deafult plan. Image was not loaded π.", duration=5)
|
41 |
image_plan_path1 = os.path.join(images_file, "100.JPG")
|
42 |
plan_image = Image.open(image_plan_path1)
|
43 |
else:
|
@@ -170,7 +170,7 @@ def main_function(plan_name, uploaded_file, interference = True, aps_int = 0, ap
|
|
170 |
|
171 |
dimensiones = plan_image.shape
|
172 |
if dimensiones[0] != 256 or dimensiones[1] != 256 or dimensiones[3] != 3:
|
173 |
-
raise gradio.Error("Error in dimensions of the uploaded image. Must [256,256,3] π£π.", duration=5)
|
174 |
raise ValueError("Error in image size. Must [256,256,3].")
|
175 |
|
176 |
plan_grayscale = plan_image[:, :, 0]
|
@@ -191,8 +191,8 @@ def main_function(plan_name, uploaded_file, interference = True, aps_int = 0, ap
|
|
191 |
dimension = 256
|
192 |
|
193 |
if interference:
|
194 |
-
if apch1 == 0 and apch6 == 0 and apch11 == 0:
|
195 |
-
|
196 |
|
197 |
channels_c = [1, 6 , 11]
|
198 |
channels = 3
|
|
|
37 |
if mapa_seleccionado == "Upload your own image" and uploaded_file is not None:
|
38 |
plan_image = Image.open(uploaded_file.name)
|
39 |
elif mapa_seleccionado == "Upload your own image" and uploaded_file is None:
|
40 |
+
# raise gradio.Warning("Deafult plan. Image was not loaded π.", duration=5)
|
41 |
image_plan_path1 = os.path.join(images_file, "100.JPG")
|
42 |
plan_image = Image.open(image_plan_path1)
|
43 |
else:
|
|
|
170 |
|
171 |
dimensiones = plan_image.shape
|
172 |
if dimensiones[0] != 256 or dimensiones[1] != 256 or dimensiones[3] != 3:
|
173 |
+
# raise gradio.Error("Error in dimensions of the uploaded image. Must [256,256,3] π£π.", duration=5)
|
174 |
raise ValueError("Error in image size. Must [256,256,3].")
|
175 |
|
176 |
plan_grayscale = plan_image[:, :, 0]
|
|
|
191 |
dimension = 256
|
192 |
|
193 |
if interference:
|
194 |
+
# if apch1 == 0 and apch6 == 0 and apch11 == 0:
|
195 |
+
# raise gradio.Warning("There are not APs for estimation π.", duration=5)
|
196 |
|
197 |
channels_c = [1, 6 , 11]
|
198 |
channels = 3
|