Extract Google Drive zip from Google colab notebook

前端 未结 12 1571
醉梦人生
醉梦人生 2020-12-25 12:29

I already have a zip of (2K images) dataset on a google drive. I have to use it in a ML training algorithm. Below Code extracts the content in a string format:



        
12条回答
  •  旧时难觅i
    2020-12-25 13:13

    Mount GDrive:

    from google.colab import drive
    drive.mount('/content/gdrive')
    

    Open the link -> copy authorization code -> paste that into the prompt and press "Enter"

    Check GDrive access:

    !ls "/content/gdrive/My Drive"
    

    Unzip (q stands for "quiet") file from GDrive:

    !unzip -q "/content/gdrive/My Drive/dataset.zip"
    

提交回复
热议问题