Skip to content

Commit

Permalink
Merge pull request #85 from aahill/march-ta-update
Browse files Browse the repository at this point in the history
[CogSvcs] Updating variable name
  • Loading branch information
aahill authored Mar 17, 2020
2 parents e3bc659 + 2a3908f commit 87b0e50
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions samples/language/text_analytics_samples.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.

# <imports>
# -*- coding: utf-8 -*-

Expand All @@ -10,7 +14,7 @@
key_var_name = 'TEXT_ANALYTICS_SUBSCRIPTION_KEY'
if not key_var_name in os.environ:
raise Exception('Please set/export the environment variable: {}'.format(key_var_name))
subscription_key = os.environ[key_var_name]
key = os.environ[key_var_name]

endpoint_var_name = 'TEXT_ANALYTICS_ENDPOINT'
if not endpoint_var_name in os.environ:
Expand All @@ -20,7 +24,7 @@

# <authentication>
def authenticateClient():
credentials = CognitiveServicesCredentials(subscription_key)
credentials = CognitiveServicesCredentials(key)
text_analytics_client = TextAnalyticsClient(
endpoint=endpoint, credentials=credentials)
return text_analytics_client
Expand Down

0 comments on commit 87b0e50

Please sign in to comment.