Spaces:
Paused
Paused
Update app.py
Browse files
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 |
-
|
11 |
|
12 |
-
|
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("")
|