Skip to content

Commit 948aeee

Browse files
small refinement
1 parent d09d902 commit 948aeee

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

notebooks/classifier.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"metadata": {},
2424
"outputs": [],
2525
"source": [
26-
"%pip install -r requirements.txt"
26+
"%pip install -r ../requirements.txt"
2727
]
2828
},
2929
{
@@ -85,13 +85,14 @@
8585
"cell_type": "markdown",
8686
"metadata": {},
8787
"source": [
88-
"## 3. Configure Azure AI Service Settings\n",
88+
"## 3. Configure Azure AI Service Settings and Prepare the Sample\n",
8989
"\n",
9090
"Update these settings to match your Azure environment:\n",
9191
"\n",
92-
"- **azure_ai_service_endpoint**: Your Azure AI service endpoint URL\n",
93-
"- **subscription_key**: Your subscription key (optional if using token authentication)\n",
94-
"- **file_location**: Path to the PDF document you want to process"
92+
"- **AZURE_AI_ENDPOINT**: Your Azure AI service endpoint URL or set up in \".env\" file\n",
93+
"- **AZURE_AI_API_VERSION**: The Azure AI API version to use. Default is \"2025-05-01-preview\". \n",
94+
"- **SUBSCRIPTION_KEY**: Your subscription key (optional if using token authentication)\n",
95+
"- **ANALYZER_SAMPLE_FILE**: Path to the PDF document you want to process"
9596
]
9697
},
9798
{
@@ -102,18 +103,17 @@
102103
"source": [
103104
"AZURE_AI_ENDPOINT = os.getenv(\"AZURE_AI_ENDPOINT\")\n",
104105
"AZURE_AI_API_VERSION = os.getenv(\"AZURE_AI_API_VERSION\", \"2025-05-01-preview\")\n",
105-
"ANALYZER_SAMPLE_FILE = '../data/MS_Annual_Report_2024.pdf' # Update this path to your PDF file\n",
106-
"\n",
107-
"file_location = Path(ANALYZER_SAMPLE_FILE)\n",
106+
"ANALYZER_SAMPLE_FILE = \"../data/MS_Annual_Report_2024.pdf\" # Update this path to your PDF file\n",
108107
"\n",
109108
"# For authentication, you can use either token-based auth or subscription key, and only one of them is required\n",
109+
"# IMPORTANT: Replace with your actual subscription key if not using token auth\n",
110+
"SUBSCRIPTION_KEY = \"dummy_key\"\n",
110111
"\n",
111112
"# Authentication - Using DefaultAzureCredential for token-based auth\n",
112113
"credential = DefaultAzureCredential()\n",
113114
"token_provider = get_bearer_token_provider(credential, \"https://cognitiveservices.azure.com/.default\")\n",
114115
"\n",
115-
"# IMPORTANT: Replace with your actual subscription key if not using token auth\n",
116-
"subscription_key = \"dummy_key\"\n",
116+
"file_location = Path(ANALYZER_SAMPLE_FILE)\n",
117117
"\n",
118118
"print(\"📋 Configuration Summary:\")\n",
119119
"print(f\" Endpoint: {AZURE_AI_ENDPOINT}\")\n",
@@ -188,7 +188,7 @@
188188
" # IMPORTANT: Comment out token_provider if using subscription key\n",
189189
" token_provider=token_provider,\n",
190190
" # IMPORTANT: Uncomment this if using subscription key\n",
191-
" # subscription_key=subscription_key\n",
191+
" # subscription_key=SUBSCRIPTION_KEY\n",
192192
" )\n",
193193
" print(\"✅ Content Understanding client initialized successfully!\")\n",
194194
" print(\" Ready to create classifiers and analyzers.\")\n",

0 commit comments

Comments
 (0)