Yasaman commited on
Commit
17bb76d
·
1 Parent(s): 3078983

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -23,12 +23,10 @@ def air_quality(city):
23
 
24
  weather_df = weather_df.drop(columns=["feelslikemin", "feelslikemax", "precipprob", "snowdepth", "uvindex", "date","city","conditions"]).fillna(0)
25
 
26
- model = get_model(project=project,
27
- model_name="gradient_boost_model",
28
- evaluation_metric="f1_score",
29
- sort_metrics_by="max"
30
- )
31
-
32
 
33
  preds = model.predict(weather_df)
34
 
 
23
 
24
  weather_df = weather_df.drop(columns=["feelslikemin", "feelslikemax", "precipprob", "snowdepth", "uvindex", "date","city","conditions"]).fillna(0)
25
 
26
+ mr = project.get_model_registry()
27
+ model = mr.get_model("gradient_boost_model", version=2)
28
+ model_dir = model.download()
29
+ model = joblib.load(model_dir + "/model.pkl")
 
 
30
 
31
  preds = model.predict(weather_df)
32