sparse-state-54304
07/04/2022, 2:30 PMunionml serve app:app --reload --model-path /tmp/model_object.pt
,
I get this error on the browser
{"detail": "Method Not Allowed"}
and in the terminal, it is showing:
INFO: 127.0.0.1:64825 - "GET /predict HTTP/1.1" 405 Method Not Allowed
My Folder structure looks like this (i.e in same directory):
-> app.py
-> client.py
-> main.py (same code as app.py)
Thanks,tall-lock-23197
import requests
from sklearn.datasets import load_digits
digits = load_digits(as_frame=True)
features = digits.frame[digits.feature_names]
prediction_response = <http://requests.post|requests.post>(
"<http://127.0.0.1:8000/predict>",
json={"features": features.sample(5, random_state=42).to_dict(orient="records")},
)
print(prediction_response.text)
tall-lock-23197
sparse-state-54304
07/05/2022, 7:51 AMunionml serve app:app --reload --model-path /tmp/model_object.pt
, and then running the client.py file, I got the output. Thanks for your help!!broad-monitor-993
07/05/2022, 2:10 PM127.0.0.1:<port>/docs
on your browser to see the API documentation