chansung commited on
Commit
eef1e9e
1 Parent(s): 4a6d757

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,16 +1,16 @@
1
  import os
2
  import gradio as gr
3
  import google.auth
 
4
 
5
  gcp_credentials = os.getenv("GCP_CREDENTIALS")
6
  with open("gcp-credentials.json", "w") as f:
7
  f.write(gcp_credentials)
8
 
9
  os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = './gcp-credentials.json'
10
- credentials, project_id = google.auth.default()
11
 
12
- print(credentials)
13
- print(project_id)
14
 
15
  with gr.Blocks() as demo:
16
  gr.Markdown("")
 
1
  import os
2
  import gradio as gr
3
  import google.auth
4
+ import vertexai
5
 
6
  gcp_credentials = os.getenv("GCP_CREDENTIALS")
7
  with open("gcp-credentials.json", "w") as f:
8
  f.write(gcp_credentials)
9
 
10
  os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = './gcp-credentials.json'
11
+ google.auth.default()
12
 
13
+ vertexai.init(project="gde-prj", location="us-central1")
 
14
 
15
  with gr.Blocks() as demo:
16
  gr.Markdown("")