-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain.py
30 lines (25 loc) · 805 Bytes
/
main.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
# ---
# jupyter:
# jupytext:
# formats: py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.13.8
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# ---
# +
from omegaconf import OmegaConf
from psidash.psidash import load_app, load_conf, load_dash, load_components, get_callbacks, assign_callbacks
conf = load_conf('elliptic.yaml')
app = load_dash(__name__, conf['app'], conf.get('import'))
app.layout = load_components(conf['layout'], conf.get('import'))
if 'callbacks' in conf:
callbacks = get_callbacks(app, conf['callbacks'])
assign_callbacks(callbacks, conf['callbacks'])
if __name__ == '__main__':
app.run_server(**conf['run_server'])