Yasaman commited on
Commit
dfeeea4
1 Parent(s): debb5dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -28,13 +28,16 @@ def air_quality(city):
28
  print(weather_df)
29
 
30
  weather_df = weather_df.drop(columns=["feelslikemin", "feelslikemax","precipprob", "snow", "snowdepth", "uvindex", "date","city","conditions"]).fillna(0)
31
-
 
 
 
32
  mr = project.get_model_registry()
33
  model = mr.get_model("gradient_boost_paris_model", version=1)
34
  model_dir = model.download()
35
  model = joblib.load(model_dir + "/model.pkl")
36
 
37
- preds = model.predict(weather_df)
38
 
39
  predictions = ''
40
  for k in range(7):
 
28
  print(weather_df)
29
 
30
  weather_df = weather_df.drop(columns=["feelslikemin", "feelslikemax","precipprob", "snow", "snowdepth", "uvindex", "date","city","conditions"]).fillna(0)
31
+ X = feature_view.get_batch_data(start_time=start_time)
32
+
33
+ X = X.drop(columns=["date"]).fillna(0)
34
+
35
  mr = project.get_model_registry()
36
  model = mr.get_model("gradient_boost_paris_model", version=1)
37
  model_dir = model.download()
38
  model = joblib.load(model_dir + "/model.pkl")
39
 
40
+ preds = model.predict(X)
41
 
42
  predictions = ''
43
  for k in range(7):