Skip to content

Instantly share code, notes, and snippets.

Created Jan 26, 2020
What would you like to do?
Serving image to TensorFlow Serving
# $1 refers to the path where the image file is located
ENCODED_IMG="$(base64 $1)"
(echo '{"inputs": [{"b64": "'; echo "$ENCODED_IMG"; echo '"}]}') | curl -H "Content-Type: application/json" -d @- http://localhost:8501/v1/models/mobilenet_v2_test:predict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment