Skip to content

Commit 87b0e50

Browse files
authored
Merge pull request #85 from aahill/march-ta-update
[CogSvcs] Updating variable name
2 parents e3bc659 + 2a3908f commit 87b0e50

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

samples/language/text_analytics_samples.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License. See License.txt in the project root for
3+
# license information.
4+
15
# <imports>
26
# -*- coding: utf-8 -*-
37

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

1519
endpoint_var_name = 'TEXT_ANALYTICS_ENDPOINT'
1620
if not endpoint_var_name in os.environ:
@@ -20,7 +24,7 @@
2024

2125
# <authentication>
2226
def authenticateClient():
23-
credentials = CognitiveServicesCredentials(subscription_key)
27+
credentials = CognitiveServicesCredentials(key)
2428
text_analytics_client = TextAnalyticsClient(
2529
endpoint=endpoint, credentials=credentials)
2630
return text_analytics_client

0 commit comments

Comments
 (0)