是否可以在模型伺服器中使用 REST 請求預測OpenVINO™?
內容類型: 相容性 | 文章 ID: 000098156 | 最近查看日期: 2024 年 03 月 21 日
無法在模型伺服器中使用 REST 請求預測OpenVINO™。
使用以下代碼在 模型伺服器中使用 REST 請求預測OpenVINO™:
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")
請參考 TensorFlow* 服務 API。