Spaces:
Sleeping
Sleeping
Download app3.py from EasySci/panel_example7: direct link, hf CLI and curl.
- Browser
- Download file 890 Bytes
-
https://huggingface.co/spaces/EasySci/panel_example7/resolve/main/app3.py
- Command line
-
hf download hf://spaces/EasySci/panel_example7/app3.py
-
curl -L -o app3.py https://huggingface.co/spaces/EasySci/panel_example7/resolve/main/app3.py
890 Bytes
| import panel as pn | |
| # Initial instructions | |
| instructions = "# Teste" | |
| # Create a Column container | |
| main_column = pn.Column(pn.pane.Markdown(instructions)) | |
| # Function to update the main column | |
| def update_main(): | |
| # New instructions to be displayed | |
| new_instructions = "## Updated Teste" | |
| # Create a new Markdown pane with the updated instructions | |
| updated_pane = pn.pane.Markdown(new_instructions) | |
| # Clear the main_column and replace it with the updated pane | |
| main_column.clear() | |
| main_column.append(updated_pane) | |
| # Layout using Template | |
| template = pn.template.FastListTemplate( | |
| title="EasySciRead", | |
| main=[ | |
| main_column, # Use the Column container in the main layout | |
| ], | |
| accent_base_color="#88d8b0", | |
| header_background="#FFFFFF", | |
| header_color="#000000", | |
| text_align='center', | |
| sidebar_width=150 | |
| ) | |
| # Run the app | |
| template.servable() |