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
- 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.
- Install the Google Cloud CLI.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
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.
-
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the AutoML and Cloud Storage APIs:
gcloud services enable storage-component.googleapis.com
automl.googleapis.com storage-api.googleapis.com - Install the Google Cloud CLI.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
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.
-
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the AutoML and Cloud Storage APIs:
gcloud services enable storage-component.googleapis.com
automl.googleapis.com storage-api.googleapis.com - Set the
PROJECT_ID
environment variable to your Project ID. The AutoML API calls and resource names include your Project ID in them. Theexport PROJECT_ID=PROJECT_ID
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
gs://project-id-vcm/dataset-name/documents/document-name.txt