Antes de começar

Antes de usar o AutoML Translation, é preciso ativá-lo no projeto. Abra a IU do AutoML Translation e selecione o projeto na lista suspensa, na parte superior direita da barra de título. No aplicativo, você recebe instruções por meio das etapas necessários, que também estão descritas a seguir.

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.

Criar um bucket do Cloud Storage

Crie um bucket do Google Cloud Storage para armazenar os pares de frases que você vai usar para treinar seu modelo personalizado. O nome do bucket precisa estar no formato: project-id-vcm. O comando a seguir cria um bucket de armazenamento denominado project-id-vcm na região us-central1.

gcloud storage buckets create gs://project-id-vcm/ --project=project-id --location=us-central1
Recomendamos a seguinte estrutura para os arquivos do Cloud Storage: gs://project-id-vcm/dataset-name/documents/document-name.txt