fhudi commited on
Commit
544c5af
·
1 Parent(s): 59895f9

add google credentials

Browse files
Files changed (1) hide show
  1. play_helper.py +14 -1
play_helper.py CHANGED
@@ -33,10 +33,23 @@ def declare_components():
33
 
34
 
35
  # %%
36
- _creds, _ = google.auth.default()
 
 
 
 
 
 
 
 
 
 
 
 
37
  _service = build("drive", "v3", credentials=_creds)
38
  _files = _service.files()
39
 
 
40
  # %%
41
  js_remove_input_helper = """(s) => {
42
  var el = document.getElementById('lintao-container');
 
33
 
34
 
35
  # %%
36
+ _creds, _ = google.auth.load_credentials_from_dict({
37
+ "type": "service_account",
38
+ "project_id": os.getenv("GOOGLE_AUTH_CREDS_PROJECT_ID", ""),
39
+ "private_key_id": os.getenv("GOOGLE_AUTH_CREDS_PRIVATE_KEY_ID", ""),
40
+ "private_key": os.getenv("GOOGLE_AUTH_CREDS_PRIVATE_KEY", ""),
41
+ "client_email": os.getenv("GOOGLE_AUTH_CREDS_CLIENT_EMAIL", ""),
42
+ "client_id": os.getenv("GOOGLE_AUTH_CREDS_CLIENT_ID", ""),
43
+ "auth_uri": "https://accounts.google.com/o/oauth2/auth",
44
+ "token_uri": "https://oauth2.googleapis.com/token",
45
+ "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
46
+ "client_x509_cert_url": os.getenv("GOOGLE_AUTH_CREDS_CLIENT_X509_CERT_URL", ""),
47
+ "universe_domain": "googleapis.com"
48
+ })
49
  _service = build("drive", "v3", credentials=_creds)
50
  _files = _service.files()
51
 
52
+
53
  # %%
54
  js_remove_input_helper = """(s) => {
55
  var el = document.getElementById('lintao-container');