filipeclduarte commited on
Commit
b781244
·
1 Parent(s): 2a94ae9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -14,6 +14,7 @@ if uploaded_file is not None:
14
  series = st.text_input("Write the name of the variable you want to forecast")
15
  date = st.text_input("Write the first date")
16
  freq = st.text_input("Write the frequency")
 
17
  if series is not None:
18
  series_train = pd.DataFrame(
19
  {
@@ -25,3 +26,11 @@ if uploaded_file is not None:
25
 
26
  fig = px.line(series_train, x='ds', y='y', title=f'{series}')
27
  st.plotly_chart(fig)
 
 
 
 
 
 
 
 
 
14
  series = st.text_input("Write the name of the variable you want to forecast")
15
  date = st.text_input("Write the first date")
16
  freq = st.text_input("Write the frequency")
17
+ horizons = st.text_input("Write the number of horizons")
18
  if series is not None:
19
  series_train = pd.DataFrame(
20
  {
 
26
 
27
  fig = px.line(series_train, x='ds', y='y', title=f'{series}')
28
  st.plotly_chart(fig)
29
+
30
+ fcst = StatsForecast(
31
+ series_train,
32
+ models=[(auto_arima, 12), (seasonal_naive, 12)],
33
+ freq=freq,
34
+ n_jobs=1
35
+ )
36
+ forecasts = fcst.forecast(horizons, level=(80, 95))