0

I have processed some png images on Colab and saved them in the Colab Directory. Now I want to save these images from Colab to Google Drive. How can I do this?

Muneeba Shamas
  • 1
  • 1
  • 1
  • 1

1 Answers1

3

Just mount your drive into Colab and create the checkpoint in the mount point location. Let me try to explain this with an example:

  1. Mount the drive as follows:
from google.colab import drive
drive.mount('/content/gdrive')

This will mount your drive and your google drive files should be all under /content/gdrive/My Drive/ location

  1. Now use your location as you would use any other location in bash or create the check-point directory as follows: You can use the ! to run bash commands in notebooks as follows:
!cp -r <PATH_TO_PNG_FOLDER> /content/gdrive/My Drive/
thanatoz
  • 2,405
  • 4
  • 16
  • 39