Spaces:
Runtime error
Runtime error
Campfireman
commited on
Commit
·
fb8241a
1
Parent(s):
10083a0
Update app.py
Browse files
app.py
CHANGED
@@ -37,8 +37,7 @@ def greet(total_pred_days):
|
|
37 |
print("Time Stamp Set. ")
|
38 |
|
39 |
|
40 |
-
|
41 |
-
latest_date = time.ctime(int(latest_date_unix))
|
42 |
print("latest_date")
|
43 |
model = get_model("temp_model", version=2)
|
44 |
model_dir =model.download()
|
@@ -50,17 +49,17 @@ def greet(total_pred_days):
|
|
50 |
model2 = get_model("tempmin_model", version=2)
|
51 |
model_dir2 =model2.download()
|
52 |
model2 =joblib.load(model_dir2+"/tempmin_model.pkl")
|
53 |
-
|
54 |
X = feature_view.get_batch_data(start_time=start_time, end_time=end_time)
|
55 |
print("Data batched")
|
|
|
|
|
56 |
X = X.drop(columns=["datetime"]).fillna(0)
|
57 |
-
|
58 |
preds = model.predict(X)
|
59 |
-
|
60 |
preds1= model1.predict(X)
|
61 |
-
|
62 |
preds2= model2.predict(X)
|
63 |
|
|
|
64 |
|
65 |
# cities = [city_tuple[0] for city_tuple in cities_coords.keys()]
|
66 |
|
|
|
37 |
print("Time Stamp Set. ")
|
38 |
|
39 |
|
40 |
+
|
|
|
41 |
print("latest_date")
|
42 |
model = get_model("temp_model", version=2)
|
43 |
model_dir =model.download()
|
|
|
49 |
model2 = get_model("tempmin_model", version=2)
|
50 |
model_dir2 =model2.download()
|
51 |
model2 =joblib.load(model_dir2+"/tempmin_model.pkl")
|
52 |
+
|
53 |
X = feature_view.get_batch_data(start_time=start_time, end_time=end_time)
|
54 |
print("Data batched")
|
55 |
+
latest_date_unix = str(X.datetime.values[0])[:10]
|
56 |
+
latest_date = time.ctime(int(latest_date_unix))
|
57 |
X = X.drop(columns=["datetime"]).fillna(0)
|
|
|
58 |
preds = model.predict(X)
|
|
|
59 |
preds1= model1.predict(X)
|
|
|
60 |
preds2= model2.predict(X)
|
61 |
|
62 |
+
|
63 |
|
64 |
# cities = [city_tuple[0] for city_tuple in cities_coords.keys()]
|
65 |
|