Spaces:
Running
Running
Commit
·
0ca6b56
1
Parent(s):
fe6c1d7
fixed token
Browse files- .env +0 -1
- app.py +2 -2
- pages/2_Long_Term_Consumption.py +1 -1
- pages/3_Short_Term_Production.py +1 -1
- pages/4_NILM_Analysis.py +1 -1
- pages/5_Anomaly_Detection_Consumption.py +1 -1
- pages/6_Anomaly_Detection_Production.py +1 -1
.env
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
NILM_API_TOKEN=p2s8X9qL4zF7vN3mK6tR1bY5cA0wE3hJ
|
|
|
|
app.py
CHANGED
@@ -19,8 +19,8 @@ st.set_page_config(
|
|
19 |
initial_sidebar_state="expanded"
|
20 |
)
|
21 |
|
22 |
-
|
23 |
-
DEFAULT_TOKEN = 'p2s8X9qL4zF7vN3mK6tR1bY5cA0wE3hJ'
|
24 |
print(DEFAULT_TOKEN)
|
25 |
logger = logging.getLogger("Data cellar demo")
|
26 |
|
|
|
19 |
initial_sidebar_state="expanded"
|
20 |
)
|
21 |
|
22 |
+
DEFAULT_TOKEN = os.getenv('NILM_API_TOKEN')
|
23 |
+
#DEFAULT_TOKEN = 'p2s8X9qL4zF7vN3mK6tR1bY5cA0wE3hJ'
|
24 |
print(DEFAULT_TOKEN)
|
25 |
logger = logging.getLogger("Data cellar demo")
|
26 |
|
pages/2_Long_Term_Consumption.py
CHANGED
@@ -4,7 +4,7 @@ import os
|
|
4 |
from utils import load_and_process_data, create_time_series_plot, display_statistics, call_api
|
5 |
|
6 |
if 'api_token' not in st.session_state:
|
7 |
-
st.session_state.api_token =
|
8 |
|
9 |
page_id = 2
|
10 |
if 'current_page' not in st.session_state:
|
|
|
4 |
from utils import load_and_process_data, create_time_series_plot, display_statistics, call_api
|
5 |
|
6 |
if 'api_token' not in st.session_state:
|
7 |
+
st.session_state.api_token = os.getenv('NILM_API_TOKEN')
|
8 |
|
9 |
page_id = 2
|
10 |
if 'current_page' not in st.session_state:
|
pages/3_Short_Term_Production.py
CHANGED
@@ -4,7 +4,7 @@ import os
|
|
4 |
from utils import load_and_process_data, create_time_series_plot, display_statistics, call_api
|
5 |
|
6 |
if 'api_token' not in st.session_state:
|
7 |
-
st.session_state.api_token =
|
8 |
|
9 |
page_id = 3
|
10 |
if 'current_page' not in st.session_state:
|
|
|
4 |
from utils import load_and_process_data, create_time_series_plot, display_statistics, call_api
|
5 |
|
6 |
if 'api_token' not in st.session_state:
|
7 |
+
st.session_state.api_token =os.getenv('NILM_API_TOKEN')
|
8 |
|
9 |
page_id = 3
|
10 |
if 'current_page' not in st.session_state:
|
pages/4_NILM_Analysis.py
CHANGED
@@ -4,7 +4,7 @@ import os
|
|
4 |
from utils import load_and_process_data, create_time_series_plot, display_statistics, call_api
|
5 |
|
6 |
if 'api_token' not in st.session_state:
|
7 |
-
st.session_state.api_token =
|
8 |
|
9 |
page_id = 4
|
10 |
if 'current_page' not in st.session_state:
|
|
|
4 |
from utils import load_and_process_data, create_time_series_plot, display_statistics, call_api
|
5 |
|
6 |
if 'api_token' not in st.session_state:
|
7 |
+
st.session_state.api_token = DEFAULT_TOKEN = os.getenv('NILM_API_TOKEN')
|
8 |
|
9 |
page_id = 4
|
10 |
if 'current_page' not in st.session_state:
|
pages/5_Anomaly_Detection_Consumption.py
CHANGED
@@ -8,7 +8,7 @@ import plotly.graph_objects as go
|
|
8 |
|
9 |
|
10 |
if 'api_token' not in st.session_state:
|
11 |
-
st.session_state.api_token =
|
12 |
|
13 |
page_id = 5
|
14 |
if 'current_page' not in st.session_state:
|
|
|
8 |
|
9 |
|
10 |
if 'api_token' not in st.session_state:
|
11 |
+
st.session_state.api_token = DEFAULT_TOKEN = os.getenv('NILM_API_TOKEN')
|
12 |
|
13 |
page_id = 5
|
14 |
if 'current_page' not in st.session_state:
|
pages/6_Anomaly_Detection_Production.py
CHANGED
@@ -8,7 +8,7 @@ import plotly.graph_objects as go
|
|
8 |
|
9 |
|
10 |
if 'api_token' not in st.session_state:
|
11 |
-
st.session_state.api_token =
|
12 |
|
13 |
page_id = 6
|
14 |
if 'current_page' not in st.session_state:
|
|
|
8 |
|
9 |
|
10 |
if 'api_token' not in st.session_state:
|
11 |
+
st.session_state.api_token = os.getenv('NILM_API_TOKEN')
|
12 |
|
13 |
page_id = 6
|
14 |
if 'current_page' not in st.session_state:
|