Before you can use AutoML Natural Language Entity Extraction, you must enable it for your project.
Set up your project
Sign in to your Google Account.
If you don't already have one, sign up for a new account.
In the GCP Console, go to the Manage resources page and select or create a project.
Make sure that billing is enabled for your Google Cloud Platform project.
- Enable the Cloud AutoML and Storage APIs.
- Install the
gcloudcommand line tool.
- Follow the instructions to create a service account and download a key file for that account.
- Set the
GOOGLE_APPLICATION_CREDENTIALSenvironment variable to the path to the service account key file that you downloaded when you created the service account.
- Set the
PROJECT_IDenvironment variable to your Project ID.
export PROJECT_ID=your-project-idThe AutoML API calls and resource names include your Project ID in them. The
PROJECT_IDenvironment variable provides a convenient way to specify the ID.
- Add yourself and your service account to the AutoML Editor IAM role.
- Replace your-userid@your-domain with your user account.
- Replace service-account-name with the name of
your new service account, for example
gcloud auth login gcloud projects add-iam-policy-binding $PROJECT_ID \ --member="user:your-userid@your-domain" \ --role="roles/automl.admin" gcloud projects add-iam-policy-binding $PROJECT_ID \ --member="serviceAccount:service-account-name" \ --role="roles/automl.editor"
Create a Cloud Storage bucket
Create a Google Cloud Storage bucket to store the documents that you
will use to train your custom model. The bucket name must be in the format:
The following command creates a storage bucket
us-central1 region named
gsutil mb -p project-id -c regional -l us-central1 gs://project-id-lcm/We recommend the following file structure for your Cloud Storage files: