Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Para usar a API do Cloud Vision, é preciso ativá-la para o projeto:
Faça login na sua conta do Google Cloud. Se você começou a usar o
Google Cloud agora,
crie uma conta para avaliar o desempenho de nossos produtos em
situações reais. Clientes novos também recebem US$ 300 em créditos para
executar, testar e implantar cargas de trabalho.
In the Service account name field, enter a name. The Google Cloud console fills
in the Service account ID field based on this name.
In the Service account description field, enter a description. For example,
Service account for quickstart.
Click Create and continue.
Grant the Project > Owner role to the service account.
To grant the role, find the Select a role list, then select
Project > Owner.
Click Continue.
Click Done to finish creating the service account.
Do not close your browser window. You will use it in the next step.
Create a service account key:
In the Google Cloud console, click the email address for the service account that you
created.
Click Keys.
Click Add key, and then click Create new key.
Click Create. A JSON key file is downloaded to your computer.
Click Close.
Defina a variável de ambiente GOOGLE_APPLICATION_CREDENTIALS como o caminho do arquivo JSON que contém suas credenciais.
Essa variável só se aplica à sessão de shell atual.
Assim, se você abrir uma nova sessão, precisará definir a variável novamente.
Exemplo: Linux ou macOS
export GOOGLE_APPLICATION_CREDENTIALS="KEY_PATH"
Substitua KEY_PATH pelo caminho do arquivo JSON que contém suas credenciais.
In the Service account name field, enter a name. The Google Cloud console fills
in the Service account ID field based on this name.
In the Service account description field, enter a description. For example,
Service account for quickstart.
Click Create and continue.
Grant the Project > Owner role to the service account.
To grant the role, find the Select a role list, then select
Project > Owner.
Click Continue.
Click Done to finish creating the service account.
Do not close your browser window. You will use it in the next step.
Create a service account key:
In the Google Cloud console, click the email address for the service account that you
created.
Click Keys.
Click Add key, and then click Create new key.
Click Create. A JSON key file is downloaded to your computer.
Click Close.
Defina a variável de ambiente GOOGLE_APPLICATION_CREDENTIALS como o caminho do arquivo JSON que contém suas credenciais.
Essa variável só se aplica à sessão de shell atual.
Assim, se você abrir uma nova sessão, precisará definir a variável novamente.
Exemplo: Linux ou macOS
export GOOGLE_APPLICATION_CREDENTIALS="KEY_PATH"
Substitua KEY_PATH pelo caminho do arquivo JSON que contém suas credenciais.