Spaces:
Sleeping
Sleeping
Update app3.py
Browse files
app3.py
CHANGED
|
@@ -1,24 +1,34 @@
|
|
| 1 |
import panel as pn
|
| 2 |
|
|
|
|
| 3 |
instructions = "# Teste"
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Layout using Template
|
| 12 |
template = pn.template.FastListTemplate(
|
| 13 |
title="EasySciRead",
|
| 14 |
main=[
|
| 15 |
-
|
| 16 |
],
|
| 17 |
accent_base_color="#88d8b0",
|
| 18 |
header_background="#FFFFFF",
|
| 19 |
-
header_color
|
| 20 |
-
text_align
|
| 21 |
-
sidebar_width
|
| 22 |
)
|
| 23 |
|
| 24 |
# Run the app
|
|
|
|
| 1 |
import panel as pn
|
| 2 |
|
| 3 |
+
# Initial instructions
|
| 4 |
instructions = "# Teste"
|
| 5 |
|
| 6 |
+
# Create a Column container
|
| 7 |
+
main_column = pn.Column(pn.pane.Markdown(instructions))
|
| 8 |
|
| 9 |
+
# Function to update the main column
|
| 10 |
+
def update_main():
|
| 11 |
+
# New instructions to be displayed
|
| 12 |
+
new_instructions = "## Updated Teste"
|
| 13 |
|
| 14 |
+
# Create a new Markdown pane with the updated instructions
|
| 15 |
+
updated_pane = pn.pane.Markdown(new_instructions)
|
| 16 |
+
|
| 17 |
+
# Clear the main_column and replace it with the updated pane
|
| 18 |
+
main_column.clear()
|
| 19 |
+
main_column.append(updated_pane)
|
| 20 |
|
| 21 |
# Layout using Template
|
| 22 |
template = pn.template.FastListTemplate(
|
| 23 |
title="EasySciRead",
|
| 24 |
main=[
|
| 25 |
+
main_column, # Use the Column container in the main layout
|
| 26 |
],
|
| 27 |
accent_base_color="#88d8b0",
|
| 28 |
header_background="#FFFFFF",
|
| 29 |
+
header_color="#000000",
|
| 30 |
+
text_align='center',
|
| 31 |
+
sidebar_width=150
|
| 32 |
)
|
| 33 |
|
| 34 |
# Run the app
|