Before you begin

Before you can use AutoML Natural Language, you must enable it for your project. Open the AutoML Natural Language UI and select the project. The application walks you through the necessary steps, which are also described below.

Set up your project

  1. Sign in to your Google Account.

    If you don't already have one, sign up for a new account.

  2. In the Cloud Console, on the project selector page, select or create a Cloud project.

    Go to the project selector page

  3. Make sure that billing is enabled for your Google Cloud project. Learn how to confirm billing is enabled for your project.

  4. Enable the AutoML and Cloud Storage APIs.

    Enable the APIs

  5. Install the gcloud command line tool.
  6. Follow the instructions to create a service account and download a key file for that account.
  7. Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path to the service account key file that you downloaded when you created the service account.
  8. Set the PROJECT_ID environment variable to your Project ID.
    export PROJECT_ID=your-project-id
    The AutoML API calls and resource names include your Project ID in them. The PROJECT_ID environment variable provides a convenient way to specify the ID.
  9. If you are an owner for your project, add your service account to the AutoML Editor IAM role, replacing 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="serviceAccount:service-account-name" \
  10. Otherwise (if you are not a project owner), ask a project owner to add both your user ID and your service account to the AutoML Editor IAM role.

Create a Cloud Storage bucket

Create a Google Cloud Storage bucket for AutoML Natural Language tasks such as importing training data. The bucket must be in either the us-central1 region or eu multi-region location.

Bucket requirements for us-central1:

  • Location type: Region
  • Location: us-central1
  • Storage class: Standard (sometimes displayed in the Google Cloud Storage browser as Regional)

Bucket requirements for eu:

  • Location type: Multi-region
  • Location: eu
  • Storage class: Standard (sometimes displayed in the Google Cloud Storage browser as Multi-Regional)