mirror of
https://github.com/Hestia-Homes/ML.git
synced 2026-06-08 11:17:25 +00:00
add a row of fake data
This commit is contained in:
parent
d7370248a2
commit
b333b80d5c
1 changed files with 9 additions and 1 deletions
|
|
@ -87,11 +87,19 @@ def handler(event, context):
|
|||
import pandas as pd
|
||||
|
||||
model.load_model(model_filepath)
|
||||
|
||||
warmup_df = pd.DataFrame(columns=model.model.original_features)
|
||||
warmup_df = pd.concat(
|
||||
[warmup_df.T, pd.DataFrame([0] * len(warmup_df.T))], axis=1
|
||||
).T
|
||||
warmup_df.fillna(0, inplace=True)
|
||||
|
||||
model.predict(data=warmup_df)
|
||||
return {
|
||||
"statusCode": 200,
|
||||
"body": json.dumps(
|
||||
{
|
||||
"message": f"{model.predict(data=pd.DataFrame(columns=model.model.original_features))}"
|
||||
"message": "Successfully processed warm up invocation",
|
||||
}
|
||||
),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue