Skip to content

Instantly share code, notes, and snippets.

@element824
Forked from staceymakes/customvis.py
Created October 31, 2019 04:30
Show Gist options
  • Select an option

  • Save element824/b52b541e415f2b34441c8463adf4c79a to your computer and use it in GitHub Desktop.

Select an option

Save element824/b52b541e415f2b34441c8463adf4c79a to your computer and use it in GitHub Desktop.
Custom Vision API Prediction - PYthon
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