Skip to content

Commit

Permalink
update inference api doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lxning committed Jan 19, 2022
1 parent b11ba0f commit 49994de
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/inference_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ or:
curl http://localhost:8080/predictions/resnet-18 -F "data=@kitten_small.jpg"
```

To get predictions from the loaded model which expects multiple inputs
```bash
curl http://localhost:8080/predictions/squeezenet1_1 -F 'data=@docs/images/dogs-before.jpg' -F 'data=@docs/images/kitten_small.jpg'

or:

import requests

res = requests.post("http://localhost:8080/predictions/squeezenet1_1", files={'data': open('docs/images/dogs-before.jpg', 'rb'), 'data': open('docs/images/kitten_small.jpg', 'rb')})
```
To get predictions from a specific version of each loaded model, make a REST call to `/predictions/{model_name}/{version}`:

* POST /predictions/{model_name}/{version}
Expand Down

0 comments on commit 49994de

Please sign in to comment.