|
| 1 | +# Set env variables for training data and reference doc for Pro mode |
| 2 | +Folders [document_training](../data/document_training/) and [field_extraction_pro_mode](../data/field_extraction_pro_mode) contain the manually labeled data for training and reference doc for Pro mode as a quick sample. Before using these knowledge source files, you need an Azure Storage blob container to store them. Let's follow below steps to prepare the data environment: |
| 3 | + |
| 4 | +1. *Create an Azure Storage Account:* If you don’t already have one, follow the guide to [create an Azure Storage Account](https://aka.ms/create-a-storage-account). |
| 5 | + > If you already have an account, you can skip this step. |
| 6 | +2. *Install Azure Storage Explorer:* Azure Storage Explorer is a tool which makes it easy to work with Azure Storage data. Install it and login with your credential, follow the [guide](https://aka.ms/download-and-install-Azure-Storage-Explorer). |
| 7 | +3. *Create or Choose a Blob Container:* Create a blob container from Azure Storage Explorer or use an existing one. |
| 8 | + <img src="./create-blob-container.png" width="600" /> |
| 9 | +4. *Generate a Shared Access Signature (SAS) URL:* |
| 10 | + - Right-click on blob container and select the `Get Shared Access Signature...` in the menu. |
| 11 | + - Check the required permissions: `Read`, `Write` and `List` |
| 12 | + - Click the `Create` button. |
| 13 | + <img src="./get-access-signature.png" height="600" /> <img src="./choose-signature-options.png" height="600" /> |
| 14 | +5. *Copy the SAS URL:* After creating the SAS, click `Copy` to get the URL with token. This will be used as the value for **TRAINING_DATA_SAS_URL** or **REFERENCE_DOC_SAS_URL** when running the sample code. |
| 15 | + <img src="./copy-access-signature.png" width="600" /> |
| 16 | +6. *Set Environment Variables in `.env` File:* Add the SAS URL as value of **TRAINING_DATA_SAS_URL** and/or **REFERENCE_DOC_SAS_URL** and designated folder path as value of **TRAINING_DATA_PATH** or **REFERENCE_DOC_PATH** into the `.env` file. |
| 17 | + |
| 18 | + ```env |
| 19 | + TRAINING_DATA_SAS_URL=<Blob container SAS URL> |
| 20 | + TRAINING_DATA_PATH=<Designated folder path under the blob container> |
| 21 | + REFERENCE_DOC_SAS_URL=<Blob container SAS URL> |
| 22 | + REFERENCE_DOC_PATH=<Designated folder path under the blob container> |
| 23 | + ``` |
| 24 | +
|
| 25 | +Now, we have completed the preparation of the data environment. Next, we could create an analyzer through code. |
| 26 | +
|
| 27 | + |
0 commit comments