Created
June 9, 2023 14:21
-
-
Save mkmohangb/15232371e637d704b05b067fa3835f4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://towardsdatascience.com/different-ways-to-connect-google-drive-to-a-google-colab-notebook-pt-1-de03433d2f7a | |
from pydrive.auth import GoogleAuth | |
from google.colab import drive | |
from pydrive.drive import GoogleDrive | |
from google.colab import auth | |
from oauth2client.client import GoogleCredentials | |
auth.authenticate_user() | |
gauth = GoogleAuth() | |
gauth.credentials = GoogleCredentials.get_application_default() | |
drive = GoogleDrive(gauth) | |
file_id = '18QLMjU2YjLO24yO8zY9tBK4kfv_4dsu4' | |
download = drive.CreateFile({'id': file_id}) | |
# Download the file to a local disc | |
download.GetContentFile('conditional_ema_ckpt.pt') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment