EasySci commited on
Commit
2db7b1e
·
1 Parent(s): 4d29d29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -12
app.py CHANGED
@@ -20,11 +20,12 @@ text = pn.pane.Markdown(instructions)
20
  # List to store the entered options
21
  entered_options = []
22
 
23
- # Add filter list row with spacing
24
- filter_list = pn.widgets.CheckButtonGroup(
25
  name='Filter Options',
 
 
26
  margin=(20, 10),
27
- options=entered_options, # Use the list of entered options
28
  sizing_mode='fixed',
29
  button_type='default'
30
  )
@@ -45,15 +46,6 @@ def add_new_option(event):
45
 
46
  add_option_button.on_click(add_new_option)
47
 
48
- # Callback for removing the selected option from the filter list
49
- def remove_selected_option(event):
50
- selected = filter_list.value
51
- if selected:
52
- entered_options.remove(selected[0]) # Remove the selected option from the entered options list
53
- filter_list.options = entered_options # Update the filter_list options
54
-
55
- filter_list.param.watch(remove_selected_option, 'value')
56
-
57
  # Layout using Template
58
  template = pn.template.FastListTemplate(
59
  title="EasySciRead",
 
20
  # List to store the entered options
21
  entered_options = []
22
 
23
+ # MultiChoice widget to display the filter options
24
+ filter_list = pn.widgets.MultiChoice(
25
  name='Filter Options',
26
+ value=[],
27
+ options=entered_options,
28
  margin=(20, 10),
 
29
  sizing_mode='fixed',
30
  button_type='default'
31
  )
 
46
 
47
  add_option_button.on_click(add_new_option)
48
 
 
 
 
 
 
 
 
 
 
49
  # Layout using Template
50
  template = pn.template.FastListTemplate(
51
  title="EasySciRead",