Sample code for Vertex AI
This code is based on the documentation at https://cloud.google.com/vertex-ai/generative-ai/docs/samples/generativeaionvertexai-gemini-generate-from-text-input
First, enable Vertex AI: https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com
Then, set up your GCP credentials according to the documentation at https://cloud.google.com/docs/authentication/provide-credentials-adc#service-account
Next, clone this repo and run pip install -r requirements.txt to install the Vertex AI Libraries.
Update app.py to include your project ID.
Finally, run python3 app.py to test if everything works!