Skip to content

Commit e6a9a51

Browse files
committed
some changes to curl commands
1 parent 8d36c9d commit e6a9a51

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

articles/cognitive-services/form-recognizer/quickstarts/curl-train-extract.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
2727
To complete this quickstart, you must have:
2828
- Access to the Form Recognizer limited-access preview. To get access to the preview, fill out and submit the [Form Recognizer access request](https://aka.ms/FormRecognizerRequestAccess) form.
2929
- [cURL](https://curl.haxx.se/windows/) installed.
30-
- A set of at least five forms of the same type. You will use this data to train the model. Your forms can be of different file types but must be the same type of document. You can use a [sample data set](https://go.microsoft.com/fwlink/?linkid=2090451) for this quickstart. Upload the training files to the root of a blob storage container in an Azure Storage account.
30+
- A set of at least six forms of the same type. You will use five of these to train the model, and then you'll test it with the sixth form. Your forms can be of different file types but must be the same type of document. You can use a [sample data set](https://go.microsoft.com/fwlink/?linkid=2090451) for this quickstart. Upload the files to the root of a blob storage container in an Azure Storage account, and keep the training files and testing files in different subfolders.
3131

3232
## Create a Form Recognizer resource
3333

@@ -44,6 +44,7 @@ To train a Form Recognizer model with the documents in your Azure blob container
4444

4545
1. Replace `<Endpoint>` with the endpoint that you obtained with your Form Recognizer subscription.
4646
1. Replace `<subscription key>` with the subscription key you copied from the previous step.
47+
1. TBD path to form
4748
1. Replace `<SAS URL>` with the Azure Blob storage container's shared access signature (SAS) URL. To retrieve the SAS URL, open the Microsoft Azure Storage Explorer, right-click your container, and select **Get shared access signature**. Make sure the **Read** and **List** permissions are checked, and click **Create**. Then copy the value in the **URL** section. It should have the form: `https://<storage account>.blob.core.windows.net/<container name>?<SAS value>`.
4849

4950
```bash
@@ -140,15 +141,15 @@ Next, you'll use your newly trained model to analyze a document and extract key-
140141

141142
1. Replace `<Endpoint>` with the endpoint that you obtained from your Form Recognizer subscription key. You can find it on your Form Recognizer resource **Overview** tab.
142143
1. Replace `<model ID>` with the model ID that you received in the previous section.
143-
1. Replace `<path to your form>` with the file path of your form (for example, C:\temp\file.pdf). This can also be a URL to a remote file. For this quickstart, you can use the files under the **Test** folder of the [sample data set](https://go.microsoft.com/fwlink/?linkid=2090451).
144-
1. Replace `<file type>` with the file type. Supported types: `application/pdf`, `image/jpeg`, `image/png`, `image/tiff`.
144+
1. Replace `<SAS URL>` with the Azure Blob storage container's shared access signature (SAS) URL.
145+
1. TBD REWRITE : Replace `<path to your form>` with the file path of your form (for example, C:\temp\file.pdf). This can also be a URL to a remote file. For this quickstart, you can use the files under the **Test** folder of the [sample data set](https://go.microsoft.com/fwlink/?linkid=2090451).
145146
1. Replace `<subscription key>` with your subscription key.
146147

147148
```bash
148-
curl -X POST "https://<Endpoint>/formrecognizer/v2.0-preview/custom/models/<model ID>/analyze" -H "Content-Type: multipart/form-data" -F "form=@\"<path to your form>\";type=<file type>" -H "Ocp-Apim-Subscription-Key: <subscription key>"
149+
curl -v "https://<Endpoint>/formrecognizer/v2.0-preview/custom/models/<model ID>/analyze" -H "Content-Type: application/json" -H "Ocp-Apim-Subscription-Key: <subscription key>" -d "{ \"source\": \""<SAS URL>"\" } "
149150
```
150151

151-
You'll receive a `202 (Success)` response with an **Operation-Location** header. The value of this header is an ID you use to track the results of the Analyze operation. Save this ID for the next step.
152+
You'll receive a `202 (Success)` response with an **Operation-Location** header. The value of this header includes a results ID you use to track the results of the Analyze operation. Save this results ID for the next step.
152153

153154
## Get the Analyze results
154155

0 commit comments

Comments
 (0)