GhoulMac commited on
Commit
bb24d11
1 Parent(s): a6b5597

Update Generate.py

Browse files
Files changed (1) hide show
  1. Generate.py +2 -1
Generate.py CHANGED
@@ -5,6 +5,7 @@ import config
5
  from tsai.inference import load_learner
6
 
7
  import pandas as pd
 
8
 
9
  def get_inputs_from_user():
10
 
@@ -51,7 +52,7 @@ def inference_Aircomp(fcst_date:string,DataFrame:pd.DataFrame):
51
  new_df=DataFrame[DataFrame[config.AIR_DATETIME_COL].isin(dates)].reset_index(drop=True)
52
 
53
 
54
- predict=load_learner('models/AirInceptionTime.pt')
55
  new_df=predict.transform(new_df)
56
 
57
  new_x,__=prepare_forecasting_data(new_df,fcst_history=config.FCST_HISTORY,fcst_horizon=0,x_vars=config.AIR_COLOUMNS,y_vars=config.AIR_COLOUMNS)
 
5
  from tsai.inference import load_learner
6
 
7
  import pandas as pd
8
+ from pathlib import Path
9
 
10
  def get_inputs_from_user():
11
 
 
52
  new_df=DataFrame[DataFrame[config.AIR_DATETIME_COL].isin(dates)].reset_index(drop=True)
53
 
54
 
55
+ predict=load_learner(Path('models/AirInceptionTime.pt'))
56
  new_df=predict.transform(new_df)
57
 
58
  new_x,__=prepare_forecasting_data(new_df,fcst_history=config.FCST_HISTORY,fcst_horizon=0,x_vars=config.AIR_COLOUMNS,y_vars=config.AIR_COLOUMNS)