EasySci commited on
Commit
d1de67a
·
1 Parent(s): 7333d96

Update app3.py

Browse files
Files changed (1) hide show
  1. app3.py +17 -7
app3.py CHANGED
@@ -1,24 +1,34 @@
1
  import panel as pn
2
 
 
3
  instructions = "# Teste"
4
 
5
- text = pn.Column(pn.pane.Markdown(instructions))
6
- text.append(pn.Column(pn.pane.Markdown(instructions)))
7
 
8
- print(str(text),flush = True)
 
 
 
9
 
 
 
 
 
 
 
10
 
11
  # Layout using Template
12
  template = pn.template.FastListTemplate(
13
  title="EasySciRead",
14
  main=[
15
- text, # Filter list row before the text
16
  ],
17
  accent_base_color="#88d8b0",
18
  header_background="#FFFFFF",
19
- header_color = "#000000",
20
- text_align = 'center',
21
- sidebar_width = 150
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