Skip to content

Commit

Permalink
load model
Browse files Browse the repository at this point in the history
  • Loading branch information
aryankeluskar committed Sep 10, 2024
1 parent 607a1ad commit 163173b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ async def calculate(date: str, amount: float, email: str):
print("date: " + date)
print("today: " + today)

# with open("data/serialized_model.json", "r") as fin:
# m = model_from_json(fin.read())
with open("data/serialized_model.json", "r") as fin:
m = model_from_json(fin.read())

# future = m.make_future_dataframe(periods=1826)
# future["cap"] = 8.5
# fcst = m.predict(future)
future = m.make_future_dataframe(periods=1826)
future["cap"] = 8.5
fcst = m.predict(future)

fcst = pd.read_csv("./docker/data/fcst.csv")
# fcst = pd.read_csv("./docker/data/fcst.csv")

fy2024 = fcst[(fcst["ds"] > today) & (fcst["ds"] < date)][["ds", "yhat"]]

Expand Down

0 comments on commit 163173b

Please sign in to comment.