Campfireman commited on
Commit
3fc38c0
·
1 Parent(s): 3a3de91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -13
app.py CHANGED
@@ -9,7 +9,7 @@ import time
9
  from datetime import timedelta, datetime
10
  from branca.element import Figure
11
 
12
- from functions import decode_features, get_model, get_model1, get_model2
13
 
14
 
15
  def greet(total_pred_days):
@@ -33,18 +33,10 @@ def greet(total_pred_days):
33
  X = feature_view.get_batch_data(start_time=start_time)
34
  latest_date_unix = str(X.datetime.values[0])[:10]
35
  latest_date = time.ctime(int(latest_date_unix))
36
- model = get_model(project=project,
37
- model_name="temp_model",
38
- evaluation_metric="f1_score",
39
- sort_metrics_by="max")
40
- model1 = get_model1(project=project,
41
- model_name="tempmax_model",
42
- evaluation_metric="f1_score",
43
- sort_metrics_by="max")
44
- model2 = get_model2(project=project,
45
- model_name="tempmin_model",
46
- evaluation_metric="f1_score",
47
- sort_metrics_by="max")
48
  X = X.drop(columns=["datetime"]).fillna(0)
49
 
50
  preds = model.predict(X)
 
9
  from datetime import timedelta, datetime
10
  from branca.element import Figure
11
 
12
+ from functions import decode_features
13
 
14
 
15
  def greet(total_pred_days):
 
33
  X = feature_view.get_batch_data(start_time=start_time)
34
  latest_date_unix = str(X.datetime.values[0])[:10]
35
  latest_date = time.ctime(int(latest_date_unix))
36
+ model = get_model("temp_model", version=2)
37
+ model1 = get_model("tempmax_model", version=2)
38
+ model2 = get_model("tempmin_model", version=2)
39
+
 
 
 
 
 
 
 
 
40
  X = X.drop(columns=["datetime"]).fillna(0)
41
 
42
  preds = model.predict(X)