Spaces:
Runtime error
Runtime error
Ashmi Banerjee
commited on
Commit
·
38f3034
1
Parent(s):
a2de729
bug fix
Browse files- setup/vertex_ai_setup.py +5 -4
setup/vertex_ai_setup.py
CHANGED
|
@@ -21,8 +21,9 @@ def decode_service_key():
|
|
| 21 |
|
| 22 |
def initialize_vertexai_params(location: Optional[str] = "us-central1"):
|
| 23 |
GOOGLE_APPLICATION_CREDENTIALS = decode_service_key()
|
| 24 |
-
service_account.Credentials.
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
)
|
| 28 |
vertexai.init(project=VERTEXAI_PROJECT, location=location)
|
|
|
|
|
|
| 21 |
|
| 22 |
def initialize_vertexai_params(location: Optional[str] = "us-central1"):
|
| 23 |
GOOGLE_APPLICATION_CREDENTIALS = decode_service_key()
|
| 24 |
+
service_account.Credentials.from_service_account_info(GOOGLE_APPLICATION_CREDENTIALS, scopes=["https://www"
|
| 25 |
+
".googleapis.com/auth/cloud-platform"])
|
| 26 |
+
|
| 27 |
+
print("service account worked")
|
| 28 |
vertexai.init(project=VERTEXAI_PROJECT, location=location)
|
| 29 |
+
print("init worked")
|