-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
31 lines (25 loc) · 1017 Bytes
/
app.py
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
import dash
import flask
from dash import Dash, html
import dash_bootstrap_components as dbc
# Usage Locally:
# $ python app.py
# select theme
# https://dash-bootstrap-components.opensource.faculty.ai/docs/themes/
external_stylesheets = [dbc.themes.CERULEAN] # CERULEAN, DARKLY, PULSE
server = flask.Flask(__name__)
app = Dash(__name__, external_stylesheets=external_stylesheets, server=server, use_pages=True) # , suppress_callback_exceptions=True
app.layout = dbc.Container([
html.H1('ISAS Interactive'),
dbc.Nav([
dbc.NavLink(html.Div(f"{page['name'].lower()}"), href=page["relative_path"], active="exact")
for page in dash.page_registry.values()
], pills=True, className='bg-light'),
html.P(),
dash.page_container
], fluid=True)
if __name__ == '__main__':
# processes=6, threaded=False,
app.run(debug=True, threaded=True, host='0.0.0.0', port='8080')
# app.run(debug=True, processes=6, threaded=False, host='0.0.0.0', port='8080')
# app.run(debug=True)