forked from snowde/dash-heroku-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.py
executable file
·35 lines (26 loc) · 884 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
32
33
34
35
# Import required libraries
import os
from random import randint
import flask
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import plotly.express as px
import plotly.graph_objects as go
import plotly.io as pio
# Setup the app
# Make sure not to change this file name or the variable names below,
# the template is configured to execute 'server' on 'app.py'
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
## Need server=app.server for heroku https://dash.plotly.com/deployment
server = app.server
# Put your Dash code here
app.layout = html.Div(children= [
html.H1("Header")
])
# Run the Dash app
if __name__ == '__main__':
server.run(debug=True, threaded=True)
# app.run_server(debug=True)