from index import app application = app.server """ wsgi.py created in Digital Ocean droplet Ubuntu 18.04; wsgi.py provides anchor for uwsgi.ini; uwsgi.ini looks for module wsgi.py and executes application variable (app.server) in file; Alias as application because uwsgi looks for 'application' in designated module variable in uwsgi.ini; """ if __name__ == "__main__": app.run_server()
), html.Div(dcc.Graph(id='R1' + each, figure=generate_histogram(each)), className='row'), ], className="four columns") for name, each in [('Bad Block Growth', 'GBB')] ] + [ html.Div([ html.Div( html.B(name), className='row container theme-color-tertiary', ), html.Div(dcc.Graph(id='R1' + each, figure=generate_statistic(each)), className='row'), ], className="four columns") for name, each in [('tErase Statistics', 'ERASE_TIME'), ('tProgram Statistics', 'PGM_TIME')] ] if __layout__ == '__main__': import sys if len(sys.argv) < 2: port = 8055 else: port = sys.argv[1] app.run_server(host='0.0.0.0', port=int(port), debug=True)
from index import app, server if __name__ == "__main__": app.run_server(host='0.0.0.0')
[dash.dependencies.Output(f"page-{i}-link", "active") for i in range(1, 4)], [dash.dependencies.Input("url", "pathname")], ) def toggle_active_links(pathname): if pathname == "/": # Treat page 1 as the homepage / index return True, False, False return [pathname == f"/page-{i}" for i in range(1, 4)] @app.callback(dash.dependencies.Output('base_page', 'children'), [dash.dependencies.Input("url", "pathname")]) def render_content(pathname): if pathname in ["/", "/page-1"]: return trajectory_page.html_base elif pathname == "/page-2": return pdf_page.html_base elif pathname == "/page-3": return pdf_same_sample_page.html_base # # elif pathname == "/page-3": # return geh_analysis_html if __name__ == "__main__": app.layout = html.Div([dcc.Location(id="url"), sidebar, html_base]) server = app.server app.run_server(debug=True)
'MP': 'Middle Page Histogram', 'UP': 'Upper Page Histogram', 'SLC': 'Single Page Histogram' } return [ html.Div([ html.Div( html.B(chart_title[layer]), className='row container theme-color-tertiary', ), html.Div( dcc.Graph(id='R1' + layer, figure=generate_figure(layer), className='row')) ], className="{} columns".format( utils.number_to_word(int(12 / len(layer_choice))))) for layer in layer_choice ] server = app.server # grapping server directly gunicorn if __layout__ == '__main__': import sys if len(sys.argv) < 2: port = 8050 else: port = sys.argv[1] app.run_server(host='0.0.0.0', port=int(port))