TorchServe RESTful API to HTTP

85 views Asked by At

I'm using PyTorch and would like to serve the trained model. I'm going to use TorchServe with AWS.

The RESTful API which is given by TorchServe (https://github.com/pytorch/serve/blob/master/docs/rest_api.md) is based on curl. How can I use this curl as HTTP?

Ex)

curl http://localhost:8080/predictions/resnet-18 -T kitten_small.jpg

this should be converted to

http://localhost:8080/predictions/resnet-18/kitten_small.jpg

The curl example that TorchServe gives uses -T option to transfer data. But TorchServe RESTful API gives just 'POST /predictions/{model_name}' without the way to transfer data in HTTP.

0

There are 0 answers