muhh-b commited on
Commit
fc203b5
1 Parent(s): 137bc25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -4,7 +4,8 @@ from audiorecorder import audiorecorder
4
  from apiclient import discovery
5
  from httplib2 import Http
6
  from oauth2client import client, file, tools
7
-
 
8
 
9
  import warnings
10
 
@@ -21,7 +22,9 @@ def main():
21
  store = file.Storage("credentials.json")
22
  creds = store.get()
23
  if not creds or creds.invalid:
24
- flow = client.flow_from_clientsecrets("client_secret_535279977482-ttq1qb18v1crma5bkf70015qk9e9r2vv.apps.googleusercontent.com.json",SCOPES)
 
 
25
  creds = tools.run_flow(flow, store)
26
  form_service = discovery.build("forms", "v1", http=creds.authorize(Http()))
27
 
 
4
  from apiclient import discovery
5
  from httplib2 import Http
6
  from oauth2client import client, file, tools
7
+ from datasets import load_dataset
8
+ from huggingface_hub import login
9
 
10
  import warnings
11
 
 
22
  store = file.Storage("credentials.json")
23
  creds = store.get()
24
  if not creds or creds.invalid:
25
+ login(token = os.environ['jsonfile'])
26
+ dataset = load_dataset("secrets/client_secret_535279977482-vc7fo2d86o7uq3qnl05epg9l6sv6a6s1.apps.googleusercontent.com.json")
27
+ flow = client.flow_from_clientsecrets(dataset,SCOPES)
28
  creds = tools.run_flow(flow, store)
29
  form_service = discovery.build("forms", "v1", http=creds.authorize(Http()))
30