Skip to content

Commit f2dc326

Browse files
committed
minor updates
1 parent bf39195 commit f2dc326

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

articles/cognitive-services/Custom-Vision-Service/use-prediction-api.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,18 @@ Once your model has been published, you can retrieve the required information by
4646

4747
## Submit data to the service
4848

49-
This guide assumes that you already constructed a FaceClient object, named faceClient, with a Face subscription key and endpoint URL. For instructions on how to set up this feature, follow one of the quickstarts.
50-
51-
In this guide, you will use a local image, so download an image you'd like to use. Copy the corresponding __Prediction-Key__ value as well.
49+
This guide assumes that you already constructed a **[CustomVisionPredictionClient](https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cognitiveservices.vision.customvision.prediction.customvisionpredictionclient?view=azure-dotnet-preview)** object, named `predictionClient`, with a Custom Vision prediction key and endpoint URL. For instructions on how to set up this feature, follow one of the [quickstarts](quickstarts/image-classification.md).
5250

51+
In this guide, you'll use a local image, so download an image you'd like to use.
5352

53+
TBD: this method has since been replaced but the ref docs don't reflect that.
5454
The **[PredictImageAsync](https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cognitiveservices.vision.customvision.prediction.customvisionpredictionclientextensions.predictimageasync?view=azure-dotnet-preview#Microsoft_Azure_CognitiveServices_Vision_CustomVision_Prediction_CustomVisionPredictionClientExtensions_PredictImageAsync_Microsoft_Azure_CognitiveServices_Vision_CustomVision_Prediction_ICustomVisionPredictionClient_System_Guid_System_IO_Stream_System_Nullable_System_Guid__System_String_System_Threading_CancellationToken_)** method.
55-
## Create the application
5655

56+
```csharp
57+
// Make a prediction against the new project
58+
Console.WriteLine("Making a prediction:");
59+
var result = predictionApi.ClassifyImage(project.Id, publishedModelName, testImage);
60+
```
5761
## Determine how to process the data
5862

5963
## Get results from the service
@@ -144,6 +148,8 @@ When you run the application, you are prompted to enter a path to an image file
144148
]
145149
}
146150
```
151+
---
152+
147153

148154
## Next steps
149155

0 commit comments

Comments
 (0)