Created
January 22, 2018 06:51
-
-
Save staceymakes/2b0197a8c7ef261eaf503fef2fd60f0e to your computer and use it in GitHub Desktop.
Custom Vision API Prediction - PYthon
This file contains hidden or 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
| import requests | |
| import json | |
| url="YOUR_PREDICTION_ENDPOINT _ AVAIL customvision.ai" | |
| headers={'content-type':'application/octet-stream','Prediction-Key':'YOUR_PREDICTION_KEY'} | |
| r =requests.post(url,data=open("YOUR_LOCAL_IMAGE.jpg","rb"),headers=headers) | |
| print(r.content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you, this code worked for me.