File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change
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
+
1
5
# <imports>
2
6
# -*- coding: utf-8 -*-
3
7
10
14
key_var_name = 'TEXT_ANALYTICS_SUBSCRIPTION_KEY'
11
15
if not key_var_name in os .environ :
12
16
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 ]
14
18
15
19
endpoint_var_name = 'TEXT_ANALYTICS_ENDPOINT'
16
20
if not endpoint_var_name in os .environ :
20
24
21
25
# <authentication>
22
26
def authenticateClient ():
23
- credentials = CognitiveServicesCredentials (subscription_key )
27
+ credentials = CognitiveServicesCredentials (key )
24
28
text_analytics_client = TextAnalyticsClient (
25
29
endpoint = endpoint , credentials = credentials )
26
30
return text_analytics_client
You can’t perform that action at this time.
0 commit comments