Skip to content

Commit 5ababbc

Browse files
authored
Update python-sdk.md
1 parent b01447c commit 5ababbc

File tree

1 file changed

+5
-3
lines changed
  • articles/ai-services/document-intelligence/quickstarts/includes

1 file changed

+5
-3
lines changed

articles/ai-services/document-intelligence/quickstarts/includes/python-sdk.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ Extract text, selection marks, text styles, table structures, and bounding regio
122122
>
123123
> * For this example, you'll need a **document file from a URL**. You can use our [sample document](https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-layout.pdf) for this quickstart.
124124
> * We've added the file URL value to the `formUrl` variable in the `analyze_layout` function.
125-
> * To analyze a given file at a URL, you'll use the `begin_analyze_document_from_url` method and pass in `prebuilt-layout` as the model Id. The returned value is a `result` object containing data about the submitted document.
126125
127126
:::moniker range="doc-intel-4.0.0"
128127

@@ -250,6 +249,8 @@ After you add a code sample to your application, build and run your program:
250249

251250
:::moniker range="doc-intel-3.1.0"
252251

252+
To analyze a given file at a URL, you'll use the `begin_analyze_document_from_url` method and pass in `prebuilt-layout` as the model Id. The returned value is a `result` object containing data about the submitted document.
253+
253254
**Add the following code sample to your form_recognizer_quickstart.py application. Make sure you update the key and endpoint variables with values from your Azure portal Form Recognizer instance:**
254255

255256
```python
@@ -276,7 +277,7 @@ def analyze_layout():
276277
endpoint=endpoint, credential=AzureKeyCredential(key)
277278
)
278279

279-
poller = document_analysis_client.begin_analyze_document(
280+
poller = document_analysis_client.begin_analyze_document_from_url(
280281
"prebuilt-layout", formUrl)
281282
result = poller.result()
282283

@@ -532,7 +533,6 @@ Analyze and extract common fields from specific document types using a prebuilt
532533
>
533534
> * Analyze an invoice using the prebuilt-invoice model. You can use our [sample invoice document](https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-invoice.pdf) for this quickstart.
534535
> * We've added the file URL value to the `invoiceUrl` variable at the top of the file.
535-
> * To analyze a given file at a URI, you'll use the `begin_analyze_document_from_url` method and pass `prebuilt-invoice` as the model Id. The returned value is a `result` object containing data about the submitted document.
536536
> * For simplicity, all the key-value pairs that the service returns are not shown here. To see the list of all supported fields and corresponding types, see our [Invoice](../../concept-invoice.md#field-extraction) concept page.
537537

538538
:::moniker range="doc-intel-4.0.0"
@@ -778,6 +778,8 @@ After you add a code sample to your application, build and run your program:
778778

779779
:::moniker range="doc-intel-3.1.0"
780780

781+
To analyze a given file at a URI, you'll use the `begin_analyze_document_from_url` method and pass `prebuilt-invoice` as the model Id. The returned value is a `result` object containing data about the submitted document.
782+
781783
**Add the following code sample to your form_recognizer_quickstart.py application. Make sure you update the key and endpoint variables with values from your Azure portal Form Recognizer instance:**
782784

783785
```python

0 commit comments

Comments
 (0)