MatteoScript commited on
Commit
ef07441
1 Parent(s): 6b89a85

Update google_function.py

Browse files
Files changed (1) hide show
  1. google_function.py +2 -1
google_function.py CHANGED
@@ -150,7 +150,8 @@ def connetti_google():
150
  creds.refresh(Request())
151
  else:
152
  flow = InstalledAppFlow.from_client_secrets_file("./credentials.json", SCOPES, redirect_uri='https://matteoscript-streamlitchat-new.hf.space')
153
- creds = flow.run_local_server(port=8501, open_browser=False)
 
154
  with open("token.json", "w") as token:
155
  token.write(creds.to_json())
156
  return creds
 
150
  creds.refresh(Request())
151
  else:
152
  flow = InstalledAppFlow.from_client_secrets_file("./credentials.json", SCOPES, redirect_uri='https://matteoscript-streamlitchat-new.hf.space')
153
+ #creds = flow.run_local_server(port=8501, open_browser=False)
154
+ creds = flow.run_console()
155
  with open("token.json", "w") as token:
156
  token.write(creds.to_json())
157
  return creds