Spaces:
Sleeping
Sleeping
Update app2.py
Browse files91 unmodified lines92939495969798993 unmodified lines10310410510610710810911011111291 unmodified linesbuttons_to_add.append(option) # Add to header if not already presentfilter_list.value = [] # Clear the selected options after adding them to the headerupdate_header() # Update the header after adding optionsprint("This is the button list2:", buttons_to_add, flush=True)run_tldr = partial(run_code, buttons_to_add)add_to_header_button.on_click(add_to_header)# Function to update the header layout with the newly created buttons3 unmodified linesheader_button = pn.widgets.Button(name=button_name, button_type = 'primary', button_style = 'outline')header_button.on_click(remove_from_header) # Add callback to remove the header buttonheader_buttons.append(header_button)# Update the filter list options to exclude buttons that are already in the headerfilter_list.options = [option for option in entered_options if option not in buttons_to_add]print("This is the button list1:", flush=True)91 unmodified lines929394959697983 unmodified lines10210310410510610710810911011111291 unmodified linesbuttons_to_add.append(option) # Add to header if not already presentfilter_list.value = [] # Clear the selected options after adding them to the headerupdate_header() # Update the header after adding optionsadd_to_header_button.on_click(add_to_header)# Function to update the header layout with the newly created buttons3 unmodified linesheader_button = pn.widgets.Button(name=button_name, button_type = 'primary', button_style = 'outline')header_button.on_click(remove_from_header) # Add callback to remove the header buttonheader_buttons.append(header_button)print("This is the button list2:", buttons_to_add, flush=True)run_tldr = partial(run_code, buttons_to_add)# Update the filter list options to exclude buttons that are already in the headerfilter_list.options = [option for option in entered_options if option not in buttons_to_add]
app2.py+4-4