Skip to content

Commit 680a9a8

Browse files
authored
Merge pull request #6 from LisaLeib/cogsrch-py-sample-update-1
Cogsrch py sample update 1
2 parents 4525db1 + 2816d32 commit 680a9a8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ This sample is a .ipynb file containing a Python3 notebook used in [Quickstart:
1919

2020
## Tutorial-AI-Enrichment-Jupyter-Notebook
2121

22-
This sample is a .ipynb file containing a Python3 notebook used in [Tutorial: Python Tutorial: Call Cognitive Services APIs in an Azure Search indexing pipeline](https://docs.microsoft.com/azure/search/cognitive-search-tutorial-blob-python). There are three placeholder values to insert: an Azure Search service, an admin API key, and a connection string to a blob storage resource that you will create in the tutorial. Replace them with valid values to create an indexing pipeline that searches for and extracts text and text representations of images and scanned documents. This sample leverages cognitive skills from the Azure Cognitive Services API, such as entity recognition and language detection.
22+
This sample is a .ipynb file containing a Python3 notebook used in [Tutorial: Python Tutorial: Call Cognitive Services APIs in an Azure Search indexing pipeline](https://docs.microsoft.com/azure/search/cognitive-search-tutorial-blob-python). There are three placeholder values to insert: an Azure Search service, an admin API key, and a connection string to a blob storage resource that you will create in the tutorial. Replace them with valid values to create an indexing pipeline that searches for and extracts text and text representations of images and scanned documents. This sample leverages cognitive skills from the Azure Cognitive Services API, such as entity recognition and language detection.
23+
24+
Run the steps individually and make sure the printed response status or response output appears before continuing to the next step. The step that creates the indexer, in particular, may take a few minutes to complete.

Tutorial-AI-Enrichment-Jupyter-Notebook/PythonTutorial-AzureSearch-AIEnrichment.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
" }\n",
6060
"}\n",
6161
"r = requests.put( endpoint + \"/datasources/\" + datasource_name, data=json.dumps(datasource_payload), headers=headers, params=params )\n",
62-
"pprint (r.json())"
62+
"print(r.status_code)"
6363
]
6464
},
6565
{
@@ -147,7 +147,7 @@
147147
"}\n",
148148
"\n",
149149
"r = requests.put(endpoint + \"/skillsets/\" + skillset_name, data=json.dumps(skillset_payload), headers=headers, params=params)\n",
150-
"pprint(r.json())"
150+
"print(r.status_code)"
151151
]
152152
},
153153
{
@@ -203,7 +203,7 @@
203203
"}\n",
204204
"\n",
205205
"r = requests.put(endpoint + \"/indexes/\" + index_name, data=json.dumps(index_payload), headers=headers, params=params)\n",
206-
"pprint(r.json())"
206+
"print(r.status_code)"
207207
]
208208
},
209209
{
@@ -258,7 +258,7 @@
258258
"}\n",
259259
"\n",
260260
"r = requests.put(endpoint + \"/indexers/\" + indexer_name, data=json.dumps(indexer_payload), headers=headers, params=params)\n",
261-
"pprint(r.json())\n"
261+
"print(r.status_code)\n"
262262
]
263263
},
264264
{

0 commit comments

Comments
 (0)