Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
import os, vertexai
|
3 |
|
4 |
from dotenv import load_dotenv, find_dotenv
|
5 |
_ = load_dotenv(find_dotenv())
|
@@ -8,8 +8,8 @@ credentials = os.environ["CREDENTIALS"]
|
|
8 |
project = os.environ["PROJECT"]
|
9 |
|
10 |
from google.oauth2 import service_account
|
11 |
-
#from google.oauth2.service_account import Credentials
|
12 |
|
|
|
13 |
credentials = service_account.Credentials.from_service_account_info(credentials)
|
14 |
|
15 |
if credentials.expired:
|
|
|
1 |
import gradio as gr
|
2 |
+
import json, os, vertexai
|
3 |
|
4 |
from dotenv import load_dotenv, find_dotenv
|
5 |
_ = load_dotenv(find_dotenv())
|
|
|
8 |
project = os.environ["PROJECT"]
|
9 |
|
10 |
from google.oauth2 import service_account
|
|
|
11 |
|
12 |
+
credentials = json.loads(credentials)
|
13 |
credentials = service_account.Credentials.from_service_account_info(credentials)
|
14 |
|
15 |
if credentials.expired:
|