Perform Foundational Data, ML, and AI Tasks in Google Cloud: Challenge Lab
Perform Foundational Data, ML, and AI Tasks in Google Cloud: Challenge Lab
TASK 4
Run these commands on your Google Cloud Shell:-
#############################################################################
gcloud iam service-accounts create my-natlang-sa --display-name "my natural language service account"
gcloud iam service-accounts keys create ~/key.json --iam-account my-natlang-sa@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com
export GOOGLE_APPLICATION_CREDENTIALS="/home/$USER/key.json"
gcloud auth activate-service-account my-natlang-sa@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com --key-file=$GOOGLE_APPLICATION_CREDENTIALS
gcloud ml language analyze-entities --content="Old Norse texts portray Odin as one-eyed and long-bearded, frequently wielding a spear named Gungnir and wearing a cloak and a broad hat." > result.json
gcloud auth login
gsutil cp result.json gs://$GOOGLE_CLOUD_PROJECT-marking/task4-cnl.result
#############################################################################
Comments
Post a Comment
If you have any doubt, let me know?