Sebelum dapat menggunakan AutoML Translation, Anda harus mengaktifkannya untuk project Anda. Buka AutoML Translation UI dan pilih project Anda dari menu drop-down di kanan atas panel judul. Aplikasi ini akan menuntun Anda melakukan langkah-langkah yang diperlukan, yang juga dijelaskan di bawah.
Menyiapkan 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 - Tetapkan variabel lingkungan
PROJECT_ID
ke Project ID Anda. Panggilan AutoML API dan nama resource menyertakan Project ID Anda di dalamnya. Variabel lingkunganexport PROJECT_ID=PROJECT_ID
PROJECT_ID
memberikan cara yang mudah untuk menentukan ID.
Membuat bucket Cloud Storage
Buat bucket Google Cloud Storage untuk menyimpan pasangan kalimat yang akan Anda gunakan untuk melatih model kustom. Nama bucket harus dalam format: project-id-vcm
.
Perintah berikut akan membuat bucket penyimpanan di region us-central1
bernama project-id-vcm
.
gsutil mb -p project-id -c regional -l us-central1 gs://project-id-vcm/
gs://project-id-vcm/dataset-name/documents/document-name.txt