Skip to content

Commit

Permalink
hw2
Browse files Browse the repository at this point in the history
  • Loading branch information
vBykoff committed Nov 24, 2022
1 parent 7efa0c2 commit aa6fc91
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions online_inference/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,6 @@ def load_model() -> None:
logger.info(f"Model is loaded")


def make_predict(model: ClassifierModel, data: HeartDisease) -> List[HeartDiseaseResponse]:

logger.info(f"Making predict")

dataset = pd.DataFrame([data.dict()])
ids = dataset["id"]
dataset = dataset.drop("id", axis=1)
logger.info(f"{input_df.columns}")
predicts = model.predict(dataset)

return list(
HeartDiseaseResponse(condition=result, id=id_) for result, id_ in zip(predicts, ids)
)


if __name__ == "__main__":
logger.info(f"Start app")
uvicorn.run("server:app", host="0.0.0.0", port=os.getenv("PORT", 8000))
Expand Down

0 comments on commit aa6fc91

Please sign in to comment.