ajflorez commited on
Commit
d372f8c
Β·
verified Β·
1 Parent(s): 888600b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -39,7 +39,7 @@ def load_plan_vi(mapa_seleccionado, uploaded_file):
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
 
42
- image_plan_path1 = os.path.join(images_file, "100.JPG")
43
  plan_image = Image.open(image_plan_path1)
44
  else:
45
  image_plan_path1 = os.path.join(images_file, mapa_seleccionado)
@@ -179,7 +179,7 @@ def main_function(plan_name, uploaded_file, interference = True, aps_int = 0, ap
179
 
180
  elif plan_name == "Upload your own image" and uploaded_file is None:
181
  # raise gradio.Warning("Deafult plan processed. Image was not loaded πŸ˜’.", duration=5)
182
- numero = "100"
183
  plan_in = np.array(Image.open(f"{path_main}Scennarios init/Scennarios B/{numero}.png")) / 255
184
 
185
  else:
@@ -588,7 +588,7 @@ with gr.Blocks() as demo:
588
 
589
  with gr.Row():
590
  with gr.Column(scale=1):
591
- map_dropdown = gr.Dropdown(choices=plan_images_list() + ["Upload your own image"], label="Select indoor plan")
592
  upload_image = gr.File(label="Or upload your own image", file_types=[".JPG", ".jpg", ".jpeg", ".png", ".PNG"])
593
  ch1_input = gr.Dropdown(choices=[i for i in range(0, 3)], label="Select APs CH 1", value=0)
594
  ch6_input = gr.Dropdown(choices=[i for i in range(0, 3)], label="Select APs CH 6", value=0)
 
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
 
42
+ image_plan_path1 = os.path.join(images_file, "80.JPG")
43
  plan_image = Image.open(image_plan_path1)
44
  else:
45
  image_plan_path1 = os.path.join(images_file, mapa_seleccionado)
 
179
 
180
  elif plan_name == "Upload your own image" and uploaded_file is None:
181
  # raise gradio.Warning("Deafult plan processed. Image was not loaded πŸ˜’.", duration=5)
182
+ numero = "80"
183
  plan_in = np.array(Image.open(f"{path_main}Scennarios init/Scennarios B/{numero}.png")) / 255
184
 
185
  else:
 
588
 
589
  with gr.Row():
590
  with gr.Column(scale=1):
591
+ map_dropdown = gr.Dropdown(choices=plan_images_list() + ["Upload your own image"], label="Select indoor plan", value="80.PNG")
592
  upload_image = gr.File(label="Or upload your own image", file_types=[".JPG", ".jpg", ".jpeg", ".png", ".PNG"])
593
  ch1_input = gr.Dropdown(choices=[i for i in range(0, 3)], label="Select APs CH 1", value=0)
594
  ch6_input = gr.Dropdown(choices=[i for i in range(0, 3)], label="Select APs CH 6", value=0)