A UI for interacting with Google Imagen2 and Gemini Pro models.
Inspired by: https://github.com/rk-man/Imagen-API
This should Just Work™ but you might need to give your Cloud Run service account some extra permissions and you'll definitely need to have enabled the Vertex API.
-
Make a .env
GOOGLE_CLOUD_PROJECT=<your Goole Cloud project name> GOOGLE_CLOUD_REGION=<the region your CLOUD_RUN_SERVICE is in> CLOUD_RUN_SERVICE=<the name of your service> VITE_PROMPT_GUIDE_LINK=<optional link to docs>
-
Source your .env e.g. in bash
set -a source .env set +a
-
Build
gcloud builds submit \ --tag ${GOOGLE_CLOUD_REGION}-docker.pkg.dev/${GOOGLE_CLOUD_PROJECT}/cloud-run-source-deploy/sandbox-ai:latest
-
Deploy
gcloud run deploy ${CLOUD_RUN_SERVICE} \ --image ${GOOGLE_CLOUD_REGION}-docker.pkg.dev/${GOOGLE_CLOUD_PROJECT}/cloud-run-source-deploy/sandbox-ai:latest \ --set-env-vars "GOOGLE_CLOUD_PROJECT=${GOOGLE_CLOUD_PROJECT}" \ --region ${GOOGLE_CLOUD_REGION}