Skip to content

Commit

Permalink
fix prob plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
dfulu committed Oct 23, 2023
1 parent de735fb commit ad95446
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ def forecast_page():
forecast_models = st.sidebar.multiselect(
"Select a model", models, ["pvnet_v2"]
)

probabilistic_forecasts = [model for model in forecast_models if model in ["National_xg", "pvnet_v2", "blend"]]

probabilisitic_models = ["National_xg", "pvnet_v2", "blend"]
probabilistic_forecasts = [model for model in forecast_models if model in probabilisitic_models]

if len(probabilistic_forecasts) > 0:
show_prob = st.sidebar.checkbox('Show Probabilities Forecast', value=False)
Expand Down Expand Up @@ -211,7 +212,7 @@ def forecast_page():
)
)

if len(forecast) > 0 and show_prob:
if len(forecast) > 0 and show_prob and (model in probabilisitic_models):
try:
properties_0 = forecast[0]._properties
if isinstance(properties_0, dict):
Expand Down

0 comments on commit ad95446

Please sign in to comment.