Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,8 @@ from azure.core.credentials import AzureKeyCredential
|
|
| 7 |
azure_endpoint = "https://t6langservice.cognitiveservices.azure.com/"
|
| 8 |
|
| 9 |
# this is the KEY for the Azure API Service I created. I did not use any class or data structure to store this key
|
| 10 |
-
azure_api_key = "3CU1gpUszvl7pLb90Ivdp1Kd5WZc56savzdXOK5GV40JHebnxnxoJQQJ99BAACYeBjFXJ3w3AAAaACOGkRT5"
|
|
|
|
| 11 |
|
| 12 |
# call to the Azure TextAnalyticsClient API
|
| 13 |
text_analytics_client = TextAnalyticsClient(endpoint=azure_endpoint, credential=AzureKeyCredential(azure_api_key))
|
|
|
|
| 7 |
azure_endpoint = "https://t6langservice.cognitiveservices.azure.com/"
|
| 8 |
|
| 9 |
# this is the KEY for the Azure API Service I created. I did not use any class or data structure to store this key
|
| 10 |
+
#azure_api_key = "3CU1gpUszvl7pLb90Ivdp1Kd5WZc56savzdXOK5GV40JHebnxnxoJQQJ99BAACYeBjFXJ3w3AAAaACOGkRT5"
|
| 11 |
+
azure_api_key = os.getenv("AZURE_API_KEY")
|
| 12 |
|
| 13 |
# call to the Azure TextAnalyticsClient API
|
| 14 |
text_analytics_client = TextAnalyticsClient(endpoint=azure_endpoint, credential=AzureKeyCredential(azure_api_key))
|