Use Machine Learning APIs on Google Cloud

Solution for Use Machine Learning APIs on Google Cloud. 1 lab: GSP329. Fast copy-paste commands for Google Cloud.

GSP329 — Use Machine Learning APIs on Google Cloud: Challenge Lab

Estimated time: 30 minutes

# Use Machine Learning APIs on Google Cloud: Challenge Lab || [GSP329] After copying the **first Cloud Shell command** above, paste it into your **Google Cloud Shell** and allow it to complete. ## ⚠️ Important Before running the next command: - ✅ Return to the lab. - ✅ Click **Check my progress** for the completed task(s), exactly as demonstrated in the video. - ✅ Once the progress has been successfully validated, return to Cloud Shell and execute the **remaining command(s)** to complete the

curl -LO https://raw.githubusercontent.com/Orbit-of-Ops/GCP-Scripts/refs/heads/main/script6.sh
sudo chmod +x script6.sh
./script6.sh
# 1. Re-export the credential variable just to be safe
export GOOGLE_APPLICATION_CREDENTIALS=${PWD}/sample-sa-key.json

# 2. Run the Python script (it will now authenticate successfully)
python3 analyze-images-v2.py $DEVSHELL_PROJECT_ID $DEVSHELL_PROJECT_ID

# 3. Verify the data was inserted into BigQuery
bq query --use_legacy_sql=false "SELECT locale,COUNT(locale) as lcount FROM image_classification_dataset.image_text_detail GROUP BY locale ORDER BY lcount DESC"