Spaces:
Running
Running
Update app2.py
Browse files
app2.py
CHANGED
|
@@ -66,7 +66,8 @@ def add_to_header(event):
|
|
| 66 |
filter_list.value = [] # Clear the selected options after adding them to the header
|
| 67 |
update_header() # Update the header after adding options
|
| 68 |
|
| 69 |
-
|
|
|
|
| 70 |
|
| 71 |
# Function to update the header layout with the newly created buttons
|
| 72 |
def update_header():
|
|
@@ -163,9 +164,7 @@ def run_code(event):
|
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
-
|
| 167 |
-
# Attach the function to the button's on_click event
|
| 168 |
-
button3.on_click(run_tldr)
|
| 169 |
|
| 170 |
# Run the app
|
| 171 |
template.servable()
|
|
|
|
| 66 |
filter_list.value = [] # Clear the selected options after adding them to the header
|
| 67 |
update_header() # Update the header after adding options
|
| 68 |
|
| 69 |
+
run_tldr = partial(run_code, buttons_to_add)
|
| 70 |
+
add_to_header_button.on_click(add_to_header, run_code)
|
| 71 |
|
| 72 |
# Function to update the header layout with the newly created buttons
|
| 73 |
def update_header():
|
|
|
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
+
|
|
|
|
|
|
|
| 168 |
|
| 169 |
# Run the app
|
| 170 |
template.servable()
|