-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
46 lines (35 loc) · 727 Bytes
/
app.py
File metadata and controls
46 lines (35 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import datetime
import dash
import dash_core_components as core
import dash_html_components as html
from dash.dependencies import Input, Output
app = dash.Dash()
def inner_text(n):
return(
"Refreshed " + str(n) + " times."
+ "<p>The time is: " + str(datetime.datetime.now())
)
app.layout = html.Div(
[
html.H4(
id="3d602"
),
core.Interval(
id="a0982",
interval=2000,
n_intervals=0
)
]
)
@app.callback(
Output("3d602", "children"),
[
Input(
"a0982", "n_intervals"
)
]
)
def update_layout(n):
return inner_text(n)
if __name__ == "__main__":
app.run_server()