Spaces:
Runtime error
Runtime error
Download authenticate_gmail.py from Vinit006/EmailAgentwithMemory: direct link, hf CLI and curl.
- Browser
- Download file 768 Bytes
-
https://huggingface.co/spaces/Vinit006/EmailAgentwithMemory/resolve/ebdd2bf49c68c9d9a89bca676c6c8d69aad340ad/authenticate_gmail.py
- Command line
-
hf download hf://spaces/Vinit006/EmailAgentwithMemory@ebdd2bf49c68c9d9a89bca676c6c8d69aad340ad/authenticate_gmail.py
-
curl -L -o authenticate_gmail.py https://huggingface.co/spaces/Vinit006/EmailAgentwithMemory/resolve/ebdd2bf49c68c9d9a89bca676c6c8d69aad340ad/authenticate_gmail.py
768 Bytes
| # import os | |
| # from google_auth_oauthlib.flow import InstalledAppFlow | |
| # # Gmail API scope | |
| # SCOPES = [ | |
| # "https://mail.google.com/" | |
| # ] | |
| # def run_authentication(): | |
| # print("Starting Google OAuth Authentication Flow...") | |
| # if not os.path.exists("credentials.json"): | |
| # print("ERROR: Please place your 'credentials.json' file in this folder first!") | |
| # return | |
| # flow = InstalledAppFlow.from_client_secrets_file( | |
| # "credentials.json", | |
| # SCOPES | |
| # ) | |
| # creds = flow.run_local_server(port=8080) | |
| # with open("token.json", "w") as token_file: | |
| # token_file.write(creds.to_json()) | |
| # print("\nSUCCESS: 'token.json' has been created successfully!") | |
| # if __name__ == "__main__": | |
| # run_authentication() |