Skip to content

Commit 23d1d92

Browse files
committed
fix test
1 parent 9cbb027 commit 23d1d92

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/make_api/app/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ async def read_root():
3939
async def predict_one(data: InferenceInput) -> dict[str, float]:
4040
try:
4141
df_input = pd.DataFrame([data.dict()]) # pd df might be overkill
42-
prediction = get_model(model_uri).predict(df_input)
42+
# prediction = get_model(model_uri).predict(df_input)
43+
pipe = mlflow.sklearn.load_model(model_uri)
44+
prediction = pipe.predict(df_input)
4345
return {"prediction": prediction[0]}
4446
except Exception as e:
4547
raise HTTPException(status_code=400, detail=f"Prediction failed: {str(e)}") from e

0 commit comments

Comments
 (0)