Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
from azure.ai.textanalytics import TextAnalyticsClient
|
| 3 |
from azure.core.credentials import AzureKeyCredential
|
| 4 |
|
|
@@ -10,6 +11,8 @@ azure_endpoint = "https://t6langservice.cognitiveservices.azure.com/"
|
|
| 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))
|
| 15 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import os
|
| 3 |
from azure.ai.textanalytics import TextAnalyticsClient
|
| 4 |
from azure.core.credentials import AzureKeyCredential
|
| 5 |
|
|
|
|
| 11 |
#azure_api_key = "3CU1gpUszvl7pLb90Ivdp1Kd5WZc56savzdXOK5GV40JHebnxnxoJQQJ99BAACYeBjFXJ3w3AAAaACOGkRT5"
|
| 12 |
azure_api_key = os.getenv("AZURE_API_KEY")
|
| 13 |
|
| 14 |
+
print(f"Azure API token: {azure_api_key}")
|
| 15 |
+
|
| 16 |
# call to the Azure TextAnalyticsClient API
|
| 17 |
text_analytics_client = TextAnalyticsClient(endpoint=azure_endpoint, credential=AzureKeyCredential(azure_api_key))
|
| 18 |
|