Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -212,7 +212,7 @@ def transfer_learning_forecasting():
|
|
212 |
if 'ds' in columns and 'unique_id' in columns:
|
213 |
columns.pop(columns.index('ds'))
|
214 |
columns.pop(columns.index('unique_id'))
|
215 |
-
|
216 |
y_col = st.selectbox("Select Target column", options=opt, index=0)
|
217 |
|
218 |
st.session_state.ds_col = ds_col
|
@@ -297,7 +297,7 @@ def dynamic_forecasting():
|
|
297 |
if 'ds' in columns and 'unique_id' in columns:
|
298 |
columns.pop(columns.index('ds'))
|
299 |
columns.pop(columns.index('unique_id'))
|
300 |
-
|
301 |
y_col = st.selectbox("Select Target column", options=opt, index=0)
|
302 |
|
303 |
df = df.rename(columns={ds_col: 'ds', y_col: 'y'})
|
@@ -341,7 +341,7 @@ def timegpt_fcst():
|
|
341 |
if 'ds' in columns and 'unique_id' in columns:
|
342 |
columns.pop(columns.index('ds'))
|
343 |
columns.pop(columns.index('unique_id'))
|
344 |
-
|
345 |
y_col = st.selectbox("Select Target column", options=opt, index=0)
|
346 |
|
347 |
df = df.rename(columns={ds_col: 'ds', y_col: 'y'})
|
@@ -363,8 +363,6 @@ def timegpt_fcst():
|
|
363 |
forecast_df = nixtla_client.forecast(
|
364 |
df=df,
|
365 |
h=7,
|
366 |
-
time_col='ds',
|
367 |
-
target_col='y',
|
368 |
freq=freq,
|
369 |
level=[90]
|
370 |
)
|
@@ -441,7 +439,7 @@ def timegpt_anom():
|
|
441 |
if 'ds' in columns and 'unique_id' in columns:
|
442 |
columns.pop(columns.index('ds'))
|
443 |
columns.pop(columns.index('unique_id'))
|
444 |
-
|
445 |
y_col = st.selectbox("Select Target column", options=opt, index=0)
|
446 |
|
447 |
df = df.rename(columns={ds_col: 'ds', y_col: 'y'})
|
@@ -457,8 +455,6 @@ def timegpt_anom():
|
|
457 |
if st.sidebar.button("Submit"):
|
458 |
anom_df = nixtla_client.detect_anomalies(
|
459 |
df=df,
|
460 |
-
time_col='ds',
|
461 |
-
target_col='y',
|
462 |
freq=freq,
|
463 |
level=90
|
464 |
)
|
|
|
212 |
if 'ds' in columns and 'unique_id' in columns:
|
213 |
columns.pop(columns.index('ds'))
|
214 |
columns.pop(columns.index('unique_id'))
|
215 |
+
opt = columns
|
216 |
y_col = st.selectbox("Select Target column", options=opt, index=0)
|
217 |
|
218 |
st.session_state.ds_col = ds_col
|
|
|
297 |
if 'ds' in columns and 'unique_id' in columns:
|
298 |
columns.pop(columns.index('ds'))
|
299 |
columns.pop(columns.index('unique_id'))
|
300 |
+
opt = columns
|
301 |
y_col = st.selectbox("Select Target column", options=opt, index=0)
|
302 |
|
303 |
df = df.rename(columns={ds_col: 'ds', y_col: 'y'})
|
|
|
341 |
if 'ds' in columns and 'unique_id' in columns:
|
342 |
columns.pop(columns.index('ds'))
|
343 |
columns.pop(columns.index('unique_id'))
|
344 |
+
opt = columns
|
345 |
y_col = st.selectbox("Select Target column", options=opt, index=0)
|
346 |
|
347 |
df = df.rename(columns={ds_col: 'ds', y_col: 'y'})
|
|
|
363 |
forecast_df = nixtla_client.forecast(
|
364 |
df=df,
|
365 |
h=7,
|
|
|
|
|
366 |
freq=freq,
|
367 |
level=[90]
|
368 |
)
|
|
|
439 |
if 'ds' in columns and 'unique_id' in columns:
|
440 |
columns.pop(columns.index('ds'))
|
441 |
columns.pop(columns.index('unique_id'))
|
442 |
+
opt = columns
|
443 |
y_col = st.selectbox("Select Target column", options=opt, index=0)
|
444 |
|
445 |
df = df.rename(columns={ds_col: 'ds', y_col: 'y'})
|
|
|
455 |
if st.sidebar.button("Submit"):
|
456 |
anom_df = nixtla_client.detect_anomalies(
|
457 |
df=df,
|
|
|
|
|
458 |
freq=freq,
|
459 |
level=90
|
460 |
)
|