Is It Possible to Request Prediction Using REST in OpenVINO™ Model Server?
Content Type: Compatibility | Article ID: 000098156 | Last Reviewed: 03/21/2024
Unable to request prediction using REST in OpenVINO™ Model Server.
Use the following codes to request prediction using REST in OpenVINO™ Model Server:
from ovmsclient import make_http_client
client = make_http_client("localhost:8000")
with open("img.jpeg", "rb") as f:
data = f.read()
inputs = {"input_name": data}
results = client.predict(inputs=inputs, model_name="my_model")
Refer to TensorFlow* Serving API.