We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a65fcc9 commit 5b6854bCopy full SHA for 5b6854b
1 file changed
vetiver/server.py
@@ -83,7 +83,12 @@ async def prediction(
83
@app.post("/predict")
84
async def prediction(input_data: Request):
85
y = await input_data.json()
86
- prediction = self.model.handler_predict(y, check_ptype=self.check_ptype)
+ from io import BytesIO # noqa
87
+
88
+ df = pd.read_csv(BytesIO(y))
89
+ prediction = self.model.handler_predict(
90
+ df, check_ptype=self.check_ptype
91
+ )
92
93
return {"prediction": prediction.tolist()}
94
0 commit comments