Commit 6365a17a authored by Guillaume Vizier's avatar Guillaume Vizier

Passage en production

parent e54a95a4
......@@ -11,6 +11,7 @@ nltk==3.4
numpy==1.16.1
pandas==0.24.1
plotly==3.6.1
python-dotenv==0.10.1
scikit-learn==0.20.2
scipy==1.2.1
seaborn==0.9.0
......@@ -2,11 +2,20 @@ import dash
import dash_core_components as dcc
import dash_html_components as html
from flask import Flask
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import plotly.graph_objs as go
from dotenv import load_dotenv
load_dotenv()
import os
server = Flask(__name__)
server.secret_key = os.getenv('SECRET_KEY')
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
DATA_PATH = '../data/raw/LA_TRANSITION_ECOLOGIQUE.csv'
......@@ -30,7 +39,7 @@ Le code-source de ce site est [disponible, sous licence libre](https://gitlab.be
Cette analyse vous est fournie par [Myriam Bégel](https://myriam.begel.fr).
'''
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app = dash.Dash(name=__name__, external_stylesheets=external_stylesheets, server=server, url_base_pathname='/grand-debat/')
app.layout = html.Div(children=[
html.H1(children='Grand débat national'),
......@@ -125,4 +134,4 @@ app.layout = html.Div(children=[
])
if __name__ == '__main__':
app.run_server(debug=True)
app.run_server(debug=os.getenv('DEBUG'))
from app import server
if __name__ == "__main__":
server.run()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment