I need to upload a large file ( Sample File) to google colab. This file is located on a google drive account.
Consider these situation:
Also, I read some stackoverflow pages like: Import data into Google Colaboratory and these ones:
Download File from URL to Google Drive using Google Colab in Python , Get Started: 3 Ways to Load CSV files into Colab and 7 ways to load external data into Google Colab. But non of them was useful for my case. I also tried !wget
command but it could not download a google drive link.
Assume you have a shared google drive link like this one:
Then share it with another person:
Now, go to your google drive and check Shared with me:
Add shortcut to drive: Now this file has been added to google drive and it is accessible in colab.
Finally, go to colab and run these commands:
from google.colab import drive
drive.mount('/content/drive')
import os
os.chdir("drive/My Drive/Weights/")
And file is there!