Skip to content

Commit ad97fe8

Browse files
committed
acrolinx
1 parent 8ba0d1e commit ad97fe8

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

articles/ai-services/computer-vision/includes/how-to-guides/analyze-image-40-python.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ ms.author: pafarley
1010

1111
## Prerequisites
1212

13-
This guide assumes you have followed the steps mentioned in the [quickstart](/azure/ai-services/computer-vision/quickstarts-sdk/image-analysis-client-library-40). This means:
13+
This guide assumes you've followed the steps of the [quickstart](/azure/ai-services/computer-vision/quickstarts-sdk/image-analysis-client-library-40). This means:
1414

15-
* You have <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision" title="created a Computer Vision resource" target="_blank">created a Computer Vision resource </a> and obtained a key and endpoint URL.
16-
* You have the appropriate SDK package installed and you have a running [quickstart](/azure/ai-services/computer-vision/quickstarts-sdk/image-analysis-client-library-40) application. You can modify this quickstart application based on the code examples here.
15+
* You've <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision" title="Created a Computer Vision resource" target="_blank">created a Computer Vision resource </a> and obtained a key and endpoint URL.
16+
* You've installed the appropriate SDK package and have a working [quickstart](/azure/ai-services/computer-vision/quickstarts-sdk/image-analysis-client-library-40) application. You can modify this quickstart application based on the code examples here.
1717

1818
## Create and authenticate the client
1919

@@ -27,7 +27,7 @@ To authenticate against the Image Analysis service, you need a Computer Vision k
2727

2828
Start by creating an [ImageAnalysisClient](/python/api/azure-ai-vision-imageanalysis/azure.ai.vision.imageanalysis.imageanalysisclient) object using one of the constructors. For example:
2929

30-
[!code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_client)]
30+
[!Code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_client)]
3131

3232

3333
## Select the image to analyze
@@ -38,14 +38,14 @@ You can select an image by providing a publicly accessible image URL, or by read
3838

3939
You can use the following sample image URL.
4040

41-
[!code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_url)]
41+
[!Code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_url)]
4242

4343

4444
### Image buffer
4545

4646
Alternatively, you can pass in the image as [bytes](https://docs.python.org/3/library/stdtypes.html#bytes-objects) object. For example, read from a local image file you want to analyze.
4747

48-
[!code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_file)]
48+
[!Code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_file)]
4949

5050
## Select visual features
5151

@@ -54,7 +54,7 @@ The Analysis 4.0 API gives you access to all of the service's image analysis fea
5454
> [!IMPORTANT]
5555
> The visual features [Captions](/java/api/com.azure.ai.vision.imageanalysis.models.visualfeatures#com-azure-ai-vision-imageanalysis-models-visualfeatures-caption) and [DenseCaptions](/java/api/com.azure.ai.vision.imageanalysis.models.visualfeatures#com-azure-ai-vision-imageanalysis-models-visualfeatures-dense-captions) are only supported in the following Azure regions: East US, France Central, Korea Central, North Europe, Southeast Asia, West Europe, West US.
5656
57-
[!code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_features)]
57+
[!Code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_features)]
5858

5959
<!--
6060
### Set model name when using a custom model
@@ -68,9 +68,9 @@ To use a custom model, create the [ImageAnalysisOptions](/python/api/azure-ai-vi
6868

6969
## Call the analyze_from_url method with options
7070

71-
The following code calls the [analyze_from_url](/python/api/azure-ai-vision-imageanalysis/azure.ai.vision.imageanalysis.imageanalysisclient#azure-ai-vision-imageanalysis-imageanalysisclient-analyzefromurl) method on the client with the features you selected above and additional options, defined below. To analyze from an image buffer instead of URL, call the method [analyze](/python/api/azure-ai-vision-imageanalysis/azure.ai.vision.imageanalysis.imageanalysisclient#azure-ai-vision-imageanalysis-imageanalysisclient-analyze) instead, with `image_data=image_data` as the first argument.
71+
The following code calls the [analyze_from_url](/python/api/azure-ai-vision-imageanalysis/azure.ai.vision.imageanalysis.imageanalysisclient#azure-ai-vision-imageanalysis-imageanalysisclient-analyzefromurl) method on the client with the features you selected above and other options, defined below. To analyze from an image buffer instead of URL, call the method [analyze](/python/api/azure-ai-vision-imageanalysis/azure.ai.vision.imageanalysis.imageanalysisclient#azure-ai-vision-imageanalysis-imageanalysisclient-analyze) instead, with `image_data=image_data` as the first argument.
7272

73-
[!code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_call)]
73+
[!Code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_call)]
7474

7575
### Select smart cropping aspect ratios
7676

@@ -90,7 +90,7 @@ You can specify the language of the returned data. The language is optional, wit
9090

9191
The following code shows you how to parse the results from the **analyze_from_url** or **analyze** operations.
9292

93-
[!code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_result)]
93+
[!Code-python[](~/cognitive-services-quickstart-code/python/ComputerVision/4-0/how-to.py?name=snippet_result)]
9494

9595

9696
<!--
@@ -127,7 +127,7 @@ Reason: PermissionDenied
127127
Message: Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.
128128
```
129129

130-
Or when you provide an image URL that does not exist or not accessible:
130+
Or when you provide an image URL that doesn't exist or is not accessible:
131131
```
132132
Status code: 400
133133
Reason: Bad Request
@@ -164,7 +164,7 @@ handler.setFormatter(formatter)
164164

165165
<!-- END SNIPPET -->
166166

167-
By default logs redact the values of URL query strings, the values of some HTTP request and response headers (including `Ocp-Apim-Subscription-Key` which holds the key), and the request and response payloads. To create logs without redaction, set the method argument `logging_enable = True` when you create `ImageAnalysisClient`, or when you call `analyze` on the client.
167+
By default logs redact the values of URL query strings, the values of some HTTP request and response headers (including `Ocp-Apim-Subscription-Key`, which holds the key), and the request and response payloads. To create logs without redaction, set the method argument `logging_enable = True` when you create `ImageAnalysisClient`, or when you call `analyze` on the client.
168168

169169
<!-- SNIPPET:sample_analyze_all_image_file.create_client_with_logging -->
170170

articles/ai-services/content-safety/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ For more information, see [Language support](/azure/ai-services/content-safety/l
112112

113113
To use the Content Safety APIs, you must create your Azure AI Content Safety resource in the supported regions. Currently, the Content Safety features are available in the following Azure regions:
114114

115-
| Region | Moderation APIs | Prompt Shields | Protected material<br>detection | Groundedness<br>detection | Incident response | Blocklists |
116-
|---|---|---|---|---|---|--|
115+
|Region | Moderation APIs | Prompt Shields | Protected material<br>detection | Groundedness<br>detection | Incident response | Blocklists |
116+
|---|---|---|---|---|---|---|
117117
| East US |||||||
118118
| East US 2 || | || | |
119-
| West US | | | | || | |
119+
| West US | | | | || |
120120
| West US 2 || | | | | |
121121
| Central US || | | | | |
122122
| North Central US || | | | | |

0 commit comments

Comments
 (0)