attilabalint
commited on
Commit
·
c4ae75a
1
Parent(s):
19b1770
removed namespace from secrets
Browse files
app.py
CHANGED
@@ -3,23 +3,21 @@ import streamlit as st
|
|
3 |
from components import summary_view
|
4 |
import utils
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
st.set_page_config(page_title='Electricity Demand Dashboard', layout='wide')
|
9 |
|
10 |
|
11 |
@st.cache_data(ttl=86400)
|
12 |
def fetch_data():
|
13 |
return utils.get_wandb_data(
|
14 |
-
st.secrets[
|
15 |
"enfobench-electricity-demand",
|
16 |
-
st.secrets["
|
17 |
job_type="metrics",
|
18 |
)
|
19 |
|
20 |
|
21 |
data = fetch_data()
|
22 |
-
models = sorted(data[
|
23 |
models_to_plot = set()
|
24 |
model_groups: dict[str, list[str]] = {}
|
25 |
|
@@ -32,9 +30,11 @@ for model in models:
|
|
32 |
|
33 |
|
34 |
with st.sidebar:
|
35 |
-
left, right = st.columns(
|
|
|
|
|
36 |
with left:
|
37 |
-
st.image("./images/ku_leuven_logo.png")
|
38 |
with right:
|
39 |
st.image("./images/energyville_logo.png")
|
40 |
|
|
|
3 |
from components import summary_view
|
4 |
import utils
|
5 |
|
6 |
+
st.set_page_config(page_title="Electricity Demand Dashboard", layout="wide")
|
|
|
|
|
7 |
|
8 |
|
9 |
@st.cache_data(ttl=86400)
|
10 |
def fetch_data():
|
11 |
return utils.get_wandb_data(
|
12 |
+
st.secrets["wandb_entity"],
|
13 |
"enfobench-electricity-demand",
|
14 |
+
st.secrets["wandb_api_key"],
|
15 |
job_type="metrics",
|
16 |
)
|
17 |
|
18 |
|
19 |
data = fetch_data()
|
20 |
+
models = sorted(data["model"].unique().tolist())
|
21 |
models_to_plot = set()
|
22 |
model_groups: dict[str, list[str]] = {}
|
23 |
|
|
|
30 |
|
31 |
|
32 |
with st.sidebar:
|
33 |
+
left, right = st.columns(
|
34 |
+
2
|
35 |
+
) # Create two columns within the right column for side-by-side images
|
36 |
with left:
|
37 |
+
st.image("./images/ku_leuven_logo.png") # Adjust the path and width as needed
|
38 |
with right:
|
39 |
st.image("./images/energyville_logo.png")
|
40 |
|