gzsbwfj03 commited on
Commit
a60dc2a
·
verified ·
1 Parent(s): 760a758

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -89,9 +89,6 @@ def update_dropdown_options(cytof_img, selected_self, selected_other1, selected_
89
  Remove the selected option in the dropdown from the other two dropdowns
90
  """
91
  updated_choices = cytof_img.channels.copy()
92
- selected_self = selected_self or []
93
- selected_other1 = selected_other1 or []
94
- selected_other2 = selected_other2 or []
95
  unavail_options = selected_self + selected_other1 + selected_other2
96
  for opt in unavail_options:
97
  updated_choices.remove(opt)
@@ -440,9 +437,9 @@ with gr.Blocks() as demo:
440
 
441
  with gr.Row(equal_height=True): # third row selects nuclei channels
442
  with gr.Column(scale=2):
443
- selected_nuclei = gr.Dropdown(label='(Required) Select the nuclei channel', interactive=True)
444
- selected_unwanted_channel = gr.Dropdown(label='(Optional) Select the unwanted channel', interactive=True)
445
- selected_membrane = gr.Dropdown(label='(Optional) Select the membrane channel', interactive=True)
446
  define_btn = gr.Button('Modify channels')
447
  with gr.Column(scale=3):
448
  channel_feedback = gr.Textbox(label='Channels info update')
 
89
  Remove the selected option in the dropdown from the other two dropdowns
90
  """
91
  updated_choices = cytof_img.channels.copy()
 
 
 
92
  unavail_options = selected_self + selected_other1 + selected_other2
93
  for opt in unavail_options:
94
  updated_choices.remove(opt)
 
437
 
438
  with gr.Row(equal_height=True): # third row selects nuclei channels
439
  with gr.Column(scale=2):
440
+ selected_nuclei = gr.Dropdown(label='(Required) Select the nuclei channel', interactive=True, multiselect=True)
441
+ selected_unwanted_channel = gr.Dropdown(label='(Optional) Select the unwanted channel', interactive=True, multiselect=True)
442
+ selected_membrane = gr.Dropdown(label='(Optional) Select the membrane channel', interactive=True, multiselect=True)
443
  define_btn = gr.Button('Modify channels')
444
  with gr.Column(scale=3):
445
  channel_feedback = gr.Textbox(label='Channels info update')