Skip to content

Commit 22aa1d2

Browse files
authored
Computer Vision - Updated endpoint
1 parent a388531 commit 22aa1d2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

samples/ComputerVision/RecognizeText/Program.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ namespace Microsoft.Azure.CognitiveServices.Samples.ComputerVision.RecognizeText
1010

1111
class Program
1212
{
13-
public const string subscriptionKey = "<your training key here>"; //Insert your Cognitive Services subscription key here
14-
public const string endpoint = "https://westus.api.cognitive.microsoft.com"; // You must use the same Azure region that you generated your subscription keys for. Free trial subscription keys are generated in the westus region.
13+
// Add your Azure Computer Vision subscription key and endpoint to your environment variables
14+
public const string subscriptionKey = Environment.GetEnvironmentVariable("COMPUTER_VISION_SUBSCRIPTION_KEY");
15+
public const string endpoint = Environment.GetEnvironmentVariable("COMPUTER_VISION_ENDPOINT");
1516

1617
static void Main(string[] args)
1718
{
@@ -111,4 +112,4 @@ private static async Task GetTextAsync(ComputerVisionClient computerVision, stri
111112
Console.WriteLine();
112113
}
113114
}
114-
}
115+
}

0 commit comments

Comments
 (0)