import os import gradio as gr import google.auth import vertexai gcp_credentials = os.getenv("GCP_CREDENTIALS") with open("gcp-credentials.json", "w") as f: f.write(gcp_credentials) os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = './gcp-credentials.json' google.auth.default() vertexai.init(project="gde-prj", location="us-central1") with gr.Blocks() as demo: gr.Markdown("") demo.launch()