Skip to content

Commit 78e2809

Browse files
Merge pull request #195138 from laujan/1940111-correct-cors-steps
resolve issues
2 parents ecc25c2 + ab351dc commit 78e2809

File tree

5 files changed

+42
-26
lines changed

5 files changed

+42
-26
lines changed
8.32 KB
Loading
-81.5 KB
Loading
-68.1 KB
Loading

articles/applied-ai-services/form-recognizer/quickstarts/try-sample-label-tool.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ keywords: document processing
1919
<!-- markdownlint-disable MD029 -->
2020
# Get started with the Form Recognizer Sample Labeling tool
2121

22-
Azure Form Recognizer is a cloud-based Azure Applied AI Service that uses machine-learning models to extract key-value pairs, text, and tables from your documents. You can use Form Recognizer to automate your data processing in applications and workflows, enhance data-driven strategies, and enrich document search capabilities.
22+
Azure Form Recognizer is a cloud-based Azure Applied AI Service that uses machine-learning models to extract key-value pairs, text, and tables from your documents. You can use Form Recognizer to automate your data processing in applications and workflows, enhance data-driven strategies, and enrich document search capabilities.
2323

2424
The Form Recognizer Sample Labeling tool is an open source tool that enables you to test the latest features of Azure Form Recognizer and Optical Character Recognition (OCR) services:
2525

@@ -31,7 +31,7 @@ The Form Recognizer Sample Labeling tool is an open source tool that enables you
3131

3232
## Prerequisites
3333

34-
You will need the following to get started:
34+
You'll need the following to get started:
3535

3636
* An Azure subscription—you can [create one for free](https://azure.microsoft.com/free/cognitive-services/)
3737

@@ -57,11 +57,11 @@ Form Recognizer offers several prebuilt models to choose from. Each model has it
5757

5858
1. Navigate to the [Form Recognizer Sample Tool](https://fott-2-1.azurewebsites.net/).
5959

60-
1. On the sample tool home page select **Use prebuilt model to get data**.
60+
1. On the sample tool home page, select **Use prebuilt model to get data**.
6161

6262
:::image type="content" source="../media/label-tool/prebuilt-1.jpg" alt-text="Analyze results of Form Recognizer Layout":::
6363

64-
1. Select the **Form Type** your would like to analyze from the dropdown window.
64+
1. Select the **Form Type** to analyze from the dropdown window.
6565

6666
1. Choose a URL for the file you would like to analyze from the below options:
6767

@@ -97,7 +97,7 @@ Azure the Form Recognizer Layout API extracts text, tables, selection marks, and
9797

9898
1. Navigate to the [Form Recognizer Sample Tool](https://fott-2-1.azurewebsites.net/).
9999

100-
1. On the sample tool home page select **Use Layout to get text, tables and selection marks**.
100+
1. On the sample tool home page, select **Use Layout to get text, tables and selection marks**.
101101

102102
:::image type="content" source="../media/label-tool/layout-1.jpg" alt-text="Connection settings for Layout Form Recognizer tool.":::
103103

@@ -130,31 +130,36 @@ Train a custom model to analyze and extract data from forms and documents specif
130130

131131
* Configure CORS
132132

133-
[CORS (Cross Origin Resource Sharing)](/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) needs to be configured on your Azure storage account for it to be accessible from the Form Recognizer Studio. To configure CORS in the Azure portal, you will need access to the CORS blade of your storage account.
134-
135-
:::image type="content" source="../media/quickstarts/storage-cors-example.png" alt-text="Screenshot that shows CORS configuration for a storage account.":::
133+
[CORS (Cross Origin Resource Sharing)](/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) needs to be configured on your Azure storage account for it to be accessible from the Form Recognizer Studio. To configure CORS in the Azure portal, you'll need access to the CORS blade of your storage account.
136134

137135
1. Select the CORS blade for the storage account.
138136

137+
:::image type="content" source="../media/quickstarts/cors-setting-menu.png" alt-text="Screenshot of the CORS setting menu in the Azure portal.":::
138+
139139
1. Start by creating a new CORS entry in the Blob service.
140140

141-
1. Set the **Allowed origins** to **https://fott-2-1.azurewebsites.net**.
141+
1. Set the **Allowed origins** to **<https://fott-2-1.azurewebsites.net>**.
142+
143+
:::image type="content" source="../media/quickstarts/storage-cors-example.png" alt-text="Screenshot that shows CORS configuration for a storage account.":::
144+
145+
> [!TIP]
146+
> You can use the wildcard character '*' rather than a specified domain to allow all origin domains to make requests via CORS.
142147
143148
1. Select all the available 8 options for **Allowed methods**.
144149

145150
1. Approve all **Allowed headers** and **Exposed headers** by entering an * in each field.
146151

147152
1. Set the **Max Age** to 120 seconds or any acceptable value.
148153

149-
1. Click the save button at the top of the page to save the changes.
154+
1. Select the save button at the top of the page to save the changes.
150155

151156
CORS should now be configured to use the storage account from Form Recognizer Studio.
152157

153158
### Use the Sample Labeling tool
154159

155160
1. Navigate to the [Form Recognizer Sample Tool](https://fott-2-1.azurewebsites.net/).
156161

157-
1. On the sample tool home page select **Use custom form to train a model with labels and get key-value pairs**.
162+
1. On the sample tool home page, select **Use custom form to train a model with labels and get key-value pairs**.
158163

159164
:::image type="content" source="../media/label-tool/custom-1.jpg" alt-text="Train a custom model.":::
160165

@@ -180,7 +185,7 @@ Configure the **Project Settings** fields with the following values:
180185
> * **Description**. Add a brief description.
181186
> * **SAS URL**. Paste the shared access signature (SAS) URL for your Azure Blob Storage container.
182187
183-
* To retrieve the SAS URL for your custom model training data, go to your storage resource in the Azure portal and select the **Storage Explorer** tab. Navigate to your container, right-click, and select **Get shared access signature**. It's important to get the SAS for your container, not for the storage account itself. Make sure the **Read**, **Write**, **Delete** and **List** permissions are checked, and click **Create**. Then copy the value in the **URL** section to a temporary location. It should have the form: `https://<storage account>.blob.core.windows.net/<container name>?<SAS value>`.
188+
* To retrieve the SAS URL for your custom model training data, go to your storage resource in the Azure portal and select the **Storage Explorer** tab. Navigate to your container, right-click, and select **Get shared access signature**. It's important to get the SAS for your container, not for the storage account itself. Make sure the **Read**, **Write**, **Delete** and **List** permissions are checked, and select **Create**. Then copy the value in the **URL** section to a temporary location. It should have the form: `https://<storage account>.blob.core.windows.net/<container name>?<SAS value>`.
184189

185190
:::image type="content" source="../media/quickstarts/get-sas-url.png" alt-text="SAS location.":::
186191

@@ -210,13 +215,13 @@ When you create or open a project, the main tag editor window opens. The tag edi
210215

211216
Select **Run OCR on all files** on the left pane to get the text and table layout information for each document. The labeling tool will draw bounding boxes around each text element.
212217

213-
The labeling tool will also show which tables have been automatically extracted. Select the table/grid icon on the left hand of the document to see the extracted table. Because the table content is automatically extracted, we will not be labeling the table content, but rather rely on the automated extraction.
218+
The labeling tool will also show which tables have been automatically extracted. Select the table/grid icon on the left hand of the document to see the extracted table. Because the table content is automatically extracted, we won't label the table content, but rather rely on the automated extraction.
214219

215220
:::image type="content" source="../media/label-tool/table-extraction.png" alt-text="Table visualization in Sample Labeling tool.":::
216221

217222
##### Apply labels to text
218223

219-
Next, you will create tags (labels) and apply them to the text elements that you want the model to analyze. Note the sample label data set includes already labeled fields; we will add another field.
224+
Next, you'll create tags (labels) and apply them to the text elements that you want the model to analyze. Note the sample label data set includes already labeled fields; we'll add another field.
220225

221226
Use the tags editor pane to create a new tag you'd like to identify:
222227

@@ -261,9 +266,9 @@ Choose the Train icon on the left pane to open the Training page. Then select th
261266

262267
#### Analyze a custom form
263268

264-
1. Select the **Analyze** (light bulb) icon on the left to test your model.
269+
1. Select the **Analyze** (light bulb) icon on the left to test your model.
265270

266-
1. Select source **Local file** and browse for a file to select from the sample dataset that you unzipped in the test folder.
271+
1. Select source **Local file** and browse for a file to select from the sample dataset that you unzipped in the test folder.
267272

268273
1. Choose the **Run analysis** button to get key/value pairs, text and tables predictions for the form. The tool will apply tags in bounding boxes and will report the confidence of each tag.
269274

articles/applied-ai-services/form-recognizer/quickstarts/try-v3-form-recognizer-studio.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.custom: ignite-fall-2021, mode-ui
1515
# Get started: Form Recognizer Studio | Preview
1616

1717
>[!NOTE]
18-
> Form Recognizer Studio is currently in public preview. Some features may not be supported or have limited capabilities.
18+
> Form Recognizer Studio is currently in public preview. Some features may not be supported or have limited capabilities.
1919
2020
[Form Recognizer Studio preview](https://formrecognizer.appliedai.azure.com/) is an online tool for visually exploring, understanding, and integrating features from the Form Recognizer service in your applications. Get started with exploring the pre-trained models with sample documents or your own. Create projects to build custom template models and reference the models in your applications using the [Python SDK preview](try-v3-python-sdk.md) and other quickstarts.
2121

@@ -72,15 +72,26 @@ A **standard performance** [**Azure Blob Storage account**](https://portal.azure
7272

7373
[CORS (Cross Origin Resource Sharing)](/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) needs to be configured on your Azure storage account for it to be accessible from the Form Recognizer Studio. To configure CORS in the Azure portal, you'll need access to the CORS blade of your storage account.
7474

75-
:::image type="content" source="../media/quickstarts/cors-updated-image.png" alt-text="Screenshot that shows CORS configuration for a storage account.":::
76-
7775
1. Select the CORS blade for the storage account.
78-
2. Start by creating a new CORS entry in the Blob service.
79-
3. Set the **Allowed origins** to **https://formrecognizer.appliedai.azure.com**.
80-
4. Select all the available 8 options for **Allowed methods**.
81-
5. Approve all **Allowed headers** and **Exposed headers** by entering an * in each field.
82-
6. Set the **Max Age** to 120 seconds or any acceptable value.
83-
7. Select the save button at the top of the page to save the changes.
76+
77+
:::image type="content" source="../media/quickstarts/cors-setting-menu.png" alt-text="Screenshot of the CORS setting menu in the Azure portal.":::
78+
79+
1. Start by creating a new CORS entry in the Blob service.
80+
81+
1. Set the **Allowed origins** to **<https://formrecognizer.appliedai.azure.com>**.
82+
83+
:::image type="content" source="../media/quickstarts/cors-updated-image.png" alt-text="Screenshot that shows CORS configuration for a storage account.":::
84+
85+
> [!TIP]
86+
> You can use the wildcard character '*' rather than a specified domain to allow all origin domains to make requests via CORS.
87+
88+
1. Select all the available 8 options for **Allowed methods**.
89+
90+
1. Approve all **Allowed headers** and **Exposed headers** by entering an * in each field.
91+
92+
1. Set the **Max Age** to 120 seconds or any acceptable value.
93+
94+
1. Select the save button at the top of the page to save the changes.
8495

8596
CORS should now be configured to use the storage account from Form Recognizer Studio.
8697

@@ -175,7 +186,7 @@ Use fixed tables to extract specific collection of values for a given set of fie
175186
### Signature detection
176187

177188
>[!NOTE]
178-
> Signature fields are currently only supported for custom template models. When training a custom neural model, labeled signature fields are ignored.
189+
> Signature fields are currently only supported for custom template models. When training a custom neural model, labeled signature fields are ignored.
179190
180191
To label for signature detection: (Custom form only)
181192

0 commit comments

Comments
 (0)