Spaces:
Running
Running
Update app2.py
Browse files
app2.py
CHANGED
|
@@ -66,7 +66,7 @@ def paper_text():
|
|
| 66 |
return text_to_print
|
| 67 |
|
| 68 |
|
| 69 |
-
def update_mainTLDR(
|
| 70 |
# Create a list to store the contents for the selected categories
|
| 71 |
content_list = []
|
| 72 |
|
|
@@ -155,14 +155,14 @@ add_to_header_button.on_click(add_to_header)
|
|
| 155 |
# Function to update the header layout with the newly created buttons
|
| 156 |
def update_header():
|
| 157 |
header_buttons.clear() # Clear the existing buttons
|
| 158 |
-
|
| 159 |
for button_name in buttons_to_add:
|
| 160 |
header_button = pn.widgets.Button(name=button_name, button_type = 'primary', button_style = 'outline')
|
| 161 |
header_button.on_click(remove_from_header) # Add callback to remove the header button
|
| 162 |
header_buttons.append(header_button)
|
| 163 |
|
| 164 |
|
| 165 |
-
main_body_instance.main_body = update_mainTLDR(
|
| 166 |
# Update the filter list options to exclude buttons that are already in the header
|
| 167 |
filter_list.options = [option for option in entered_options if option not in buttons_to_add]
|
| 168 |
|
|
|
|
| 66 |
return text_to_print
|
| 67 |
|
| 68 |
|
| 69 |
+
def update_mainTLDR():
|
| 70 |
# Create a list to store the contents for the selected categories
|
| 71 |
content_list = []
|
| 72 |
|
|
|
|
| 155 |
# Function to update the header layout with the newly created buttons
|
| 156 |
def update_header():
|
| 157 |
header_buttons.clear() # Clear the existing buttons
|
| 158 |
+
|
| 159 |
for button_name in buttons_to_add:
|
| 160 |
header_button = pn.widgets.Button(name=button_name, button_type = 'primary', button_style = 'outline')
|
| 161 |
header_button.on_click(remove_from_header) # Add callback to remove the header button
|
| 162 |
header_buttons.append(header_button)
|
| 163 |
|
| 164 |
|
| 165 |
+
main_body_instance.main_body = update_mainTLDR()
|
| 166 |
# Update the filter list options to exclude buttons that are already in the header
|
| 167 |
filter_list.options = [option for option in entered_options if option not in buttons_to_add]
|
| 168 |
|