rk68 commited on
Commit
12834ac
·
verified ·
1 Parent(s): bd9a6be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -51,6 +51,9 @@ creds_dict = {
51
  "auth_provider_x509_cert_url": os.getenv("auth_provider_x509_cert_url"),
52
  "client_x509_cert_url": os.getenv("client_x509_cert_url")
53
  }
 
 
 
54
  creds = ServiceAccountCredentials.from_json_keyfile_dict(creds_dict, scope)
55
  client = gspread.authorize(creds)
56
  sheet = client.open("RAG").sheet1
 
51
  "auth_provider_x509_cert_url": os.getenv("auth_provider_x509_cert_url"),
52
  "client_x509_cert_url": os.getenv("client_x509_cert_url")
53
  }
54
+
55
+ creds_dict = json.loads(creds_dict)
56
+ creds_dict['private_key'] = sa_creds['private_key'].replace('\\n', '\n')
57
  creds = ServiceAccountCredentials.from_json_keyfile_dict(creds_dict, scope)
58
  client = gspread.authorize(creds)
59
  sheet = client.open("RAG").sheet1