azrai99 commited on
Commit
d837990
·
verified ·
1 Parent(s): 94a13a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -312,6 +312,12 @@ def dynamic_forecasting():
312
  forecast_time_series(df, dynamic_model_choice, dynamic_horizon, dynamic_max_steps,y_col)
313
 
314
  def timegpt():
 
 
 
 
 
 
315
  st.title("TimeGPT Forecasting")
316
  with st.sidebar.expander("Upload and Configure Dataset", expanded=True):
317
  uploaded_file = st.file_uploader("Upload your time series data (CSV)", type=["csv"])
@@ -328,7 +334,13 @@ def timegpt():
328
  y_col = st.selectbox("Select Target column", options=columns, index=columns.index('y') if 'y' in columns else 1
329
 
330
 
331
-
 
 
 
 
 
 
332
 
333
 
334
 
 
312
  forecast_time_series(df, dynamic_model_choice, dynamic_horizon, dynamic_max_steps,y_col)
313
 
314
  def timegpt():
315
+ nixtla_token = os.environ.get("NIXTLA_API_KEY")
316
+ nixtla_client = NixtlaClient(
317
+ api_key = api_key
318
+ )
319
+
320
+
321
  st.title("TimeGPT Forecasting")
322
  with st.sidebar.expander("Upload and Configure Dataset", expanded=True):
323
  uploaded_file = st.file_uploader("Upload your time series data (CSV)", type=["csv"])
 
334
  y_col = st.selectbox("Select Target column", options=columns, index=columns.index('y') if 'y' in columns else 1
335
 
336
 
337
+ nixtla_client.plot(
338
+ df,
339
+ id_col= y_col
340
+ time_col=ds_col,
341
+ target_col=y_col,
342
+ max_insample_length=365
343
+ )
344
 
345
 
346