Created
September 23, 2020 15:29
-
-
Save ClementWalter/66a102382257b316bb4031669c809f79 to your computer and use it in GitHub Desktop.
Perform a batch request onto a Tensorflow served model with docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
response = requests.post( | |
"http://localhost:8501/v1/models/classifier:predict", | |
json={ | |
"signature_name": "serving_default", # can be omitted | |
"inputs": { | |
"image_bytes": [image.numpy().decode("utf-8") for image in image_bytes][:2], # batch request | |
}, | |
}, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment