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 Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. Install the Google Cloud CLI.
  3. To initialize the gcloud CLI, run the following command:

    gcloud init
  4. Create or select a Google Cloud project.

    • Create a Google Cloud project:

      gcloud projects create PROJECT_ID

      Replace PROJECT_ID with a name for the Google Cloud project you are creating.

    • Select the Google Cloud project that you created:

      gcloud config set project PROJECT_ID

      Replace PROJECT_ID with your Google Cloud project name.

  5. Make sure that billing is enabled for your Google Cloud project.

  6. Enable the AutoML and Cloud Storage APIs:

    gcloud services enable storage-component.googleapis.com automl.googleapis.com storage-api.googleapis.com
  7. Install the Google Cloud CLI.
  8. To initialize the gcloud CLI, run the following command:

    gcloud init
  9. Create or select a Google Cloud project.

    • Create a Google Cloud project:

      gcloud projects create PROJECT_ID

      Replace PROJECT_ID with a name for the Google Cloud project you are creating.

    • Select the Google Cloud project that you created:

      gcloud config set project PROJECT_ID

      Replace PROJECT_ID with your Google Cloud project name.

  10. Make sure that billing is enabled for your Google Cloud project.

  11. Enable the AutoML and Cloud Storage APIs:

    gcloud services enable storage-component.googleapis.com automl.googleapis.com storage-api.googleapis.com
  12. Set the PROJECT_ID environment variable to your Project ID.
    export PROJECT_ID=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.

Create a Cloud Storage bucket

Create a 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 Cloud Storage browser as Regional)

Bucket requirements for eu:

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