Spaces:
Running
Running
Update google_function.py
Browse files149 unmodified lines150151152153154155156149 unmodified linescreds.refresh(Request())else:flow = InstalledAppFlow.from_client_secrets_file("./credentials.json", SCOPES, redirect_uri='https://matteoscript-streamlitchat-new.hf.space')creds = flow.run_local_server(port=8501, open_browser=False)with open("token.json", "w") as token:token.write(creds.to_json())return creds149 unmodified lines150151152153154155156157149 unmodified linescreds.refresh(Request())else:flow = InstalledAppFlow.from_client_secrets_file("./credentials.json", SCOPES, redirect_uri='https://matteoscript-streamlitchat-new.hf.space')#creds = flow.run_local_server(port=8501, open_browser=False)creds = flow.run_console()with open("token.json", "w") as token:token.write(creds.to_json())return creds
google_function.py+2-1