-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
26 lines (20 loc) · 827 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
from dash import Dash
import dash_bootstrap_components as dbc
from layouts import get_file_upload, get_data_display, get_sankey_section
from callbacks import register_callbacks
# Initialize the app
app = Dash(__name__, external_stylesheets=[dbc.themes.CYBORG, dbc.icons.BOOTSTRAP])
server = app.server
# Global variable for uploaded data
uploaded_data = {}
# Define app layout
app.layout = dbc.Container([
get_file_upload(), # File upload section
get_data_display(), # Spreadsheet data and bar plot section
get_sankey_section() # Sankey plot section
], fluid=True, style={"backgroundColor": "#1e1e1e", "paddingBottom": "20px"})
# Register callbacks
register_callbacks(app, uploaded_data)
# Run the app
if __name__ == "__main__":
app.run_server(debug=True, port=8051)