Update app.py
Browse files
app.py
CHANGED
@@ -10,16 +10,15 @@ project = os.environ["PROJECT"]
|
|
10 |
from google.oauth2 import service_account
|
11 |
|
12 |
credentials = json.loads(credentials)
|
13 |
-
print(credentials)
|
14 |
credentials = service_account.Credentials.from_service_account_info(credentials)
|
15 |
-
print(
|
16 |
|
17 |
-
if credentials.expired:
|
18 |
-
credentials.refresh(Request())
|
19 |
|
20 |
vertexai.init(project = project,
|
21 |
location = "us-west1",
|
22 |
-
|
23 |
|
24 |
from vertexai.language_models import TextGenerationModel
|
25 |
|
|
|
10 |
from google.oauth2 import service_account
|
11 |
|
12 |
credentials = json.loads(credentials)
|
|
|
13 |
credentials = service_account.Credentials.from_service_account_info(credentials)
|
14 |
+
print("###"+credentials)
|
15 |
|
16 |
+
#if credentials.expired:
|
17 |
+
# credentials.refresh(Request())
|
18 |
|
19 |
vertexai.init(project = project,
|
20 |
location = "us-west1",
|
21 |
+
credentials = credentials)
|
22 |
|
23 |
from vertexai.language_models import TextGenerationModel
|
24 |
|