Created
June 24, 2019 03:03
-
-
Save lbugnion/31e78d57712c45262a30bd0c661586f3 to your computer and use it in GitHub Desktop.
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
private CustomVisionPredictionClient _endpoint; | |
// ... | |
if (_endpoint == null) | |
{ | |
_endpoint = new CustomVisionPredictionClient | |
{ | |
ApiKey = App.PredictionKey // PredictionKey copied from the CustomVision.ai project | |
}; | |
} | |
// ... | |
IEnumerable<PredictionModel> tags = null; | |
using (var stream = file.GetStream()) | |
{ | |
tags = _endpoint.ClassifyImage(App.ProjectGuid, "Iteration2", stream) | |
.Predictions | |
.OrderByDescending(p => p.Probability); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment