Nevidu commited on
Commit
309800b
·
verified ·
1 Parent(s): 2d39d7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -20,9 +20,9 @@ def predict(team, inning, venue, hits, errors, lob, runs, opp_team, opp_runs, op
20
  # print(df.columns)
21
  # print(len(df.columns))
22
  xgb_model = xgb.XGBRegressor()
23
- xgb_model.load_model('xgbr1_exp9_model.json')
24
 
25
- with open('pca_model6.pkl', 'rb') as f:
26
  pca = pickle.load(f)
27
 
28
  # with open('label_encoder_teams_xgbr1_exp3.pkl', 'rb') as f:
@@ -59,7 +59,7 @@ def predict_2(team, inning, venue, hits, errors, lob, runs, opp_team, opp_runs,
59
  df = df.reindex(columns=df_main.columns, fill_value=0)
60
 
61
  cat_model = CatBoostRegressor()
62
- cat_model.load_model('catbr1_exp10_model.json')
63
 
64
  # with open('label_encoder_teams_catbr1_exp1.pkl', 'rb') as f:
65
  # label_encoder = pickle.load(f)
@@ -74,7 +74,7 @@ def predict_2(team, inning, venue, hits, errors, lob, runs, opp_team, opp_runs,
74
 
75
  # print(df)
76
 
77
- with open('pca_model6.pkl', 'rb') as f:
78
  pca = pickle.load(f)
79
 
80
  df = pca.transform(df)
 
20
  # print(df.columns)
21
  # print(len(df.columns))
22
  xgb_model = xgb.XGBRegressor()
23
+ xgb_model.load_model('xgbr1_exp10_model.json')
24
 
25
+ with open('pca_model7.pkl', 'rb') as f:
26
  pca = pickle.load(f)
27
 
28
  # with open('label_encoder_teams_xgbr1_exp3.pkl', 'rb') as f:
 
59
  df = df.reindex(columns=df_main.columns, fill_value=0)
60
 
61
  cat_model = CatBoostRegressor()
62
+ cat_model.load_model('catbr1_exp11_model.json')
63
 
64
  # with open('label_encoder_teams_catbr1_exp1.pkl', 'rb') as f:
65
  # label_encoder = pickle.load(f)
 
74
 
75
  # print(df)
76
 
77
+ with open('pca_model7.pkl', 'rb') as f:
78
  pca = pickle.load(f)
79
 
80
  df = pca.transform(df)