Spaces:
Runtime error
Runtime error
Commit
·
9b97514
1
Parent(s):
f65696e
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import pandas as pd
|
|
| 4 |
import plotly.express as px
|
| 5 |
import plotly.graph_objs as go
|
| 6 |
from statsforecast import StatsForecast
|
| 7 |
-
from statsforecast.models import
|
| 8 |
from utils import calc_seasonality
|
| 9 |
|
| 10 |
@st.cache
|
|
@@ -43,7 +43,7 @@ if uploaded_file is not None:
|
|
| 43 |
with st.spinner('Wait for it...'):
|
| 44 |
fcst = StatsForecast(
|
| 45 |
series_train,
|
| 46 |
-
models=[(auto_arima, seasonality),
|
| 47 |
freq=freq,
|
| 48 |
n_jobs=1
|
| 49 |
)
|
|
@@ -80,16 +80,7 @@ if uploaded_file is not None:
|
|
| 80 |
line=dict(width=1),
|
| 81 |
showlegend=True
|
| 82 |
),
|
| 83 |
-
|
| 84 |
-
name=f'seasonal_naive_season_length-{seasonality}',
|
| 85 |
-
x=forecasts['ds'],
|
| 86 |
-
y=forecasts[f'seasonal_naive_season_length-{seasonality}'],
|
| 87 |
-
mode='lines',
|
| 88 |
-
marker=dict(color='red'),
|
| 89 |
-
line=dict(width=1),
|
| 90 |
-
showlegend=True
|
| 91 |
-
)
|
| 92 |
-
])
|
| 93 |
fig_forecast.update_layout(
|
| 94 |
yaxis_title=series,
|
| 95 |
title=f'Forecasting {series}'
|
|
|
|
| 4 |
import plotly.express as px
|
| 5 |
import plotly.graph_objs as go
|
| 6 |
from statsforecast import StatsForecast
|
| 7 |
+
from statsforecast.models import auto_arima
|
| 8 |
from utils import calc_seasonality
|
| 9 |
|
| 10 |
@st.cache
|
|
|
|
| 43 |
with st.spinner('Wait for it...'):
|
| 44 |
fcst = StatsForecast(
|
| 45 |
series_train,
|
| 46 |
+
models=[(auto_arima, seasonality), ],
|
| 47 |
freq=freq,
|
| 48 |
n_jobs=1
|
| 49 |
)
|
|
|
|
| 80 |
line=dict(width=1),
|
| 81 |
showlegend=True
|
| 82 |
),
|
| 83 |
+
])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
fig_forecast.update_layout(
|
| 85 |
yaxis_title=series,
|
| 86 |
title=f'Forecasting {series}'
|