-
-
Save korakot/e7f04fa7bd3a8a67b729da279ab1713a to your computer and use it in GitHub Desktop.
files.download('example.txt') # from colab to browser download |
from google.colab import files | |
uploaded = files.upload() # then browse, select the files. It's then uploaded | |
# uploaded is now a dict containing "filename" -> Content |
It selects single file but I need to upload folder which has subfolders. Any help?
Follow this tutorial to connect your drive storage to the colab space:
https://medium.com/deep-learning-turkey/google-colab-free-gpu-tutorial-e113627b9f5d
What is the directory in which the file get uploaded when i upload it with
from google.colab import files
files.upload()
It's just added to the current directory
@008karan You can compress them into a zip-like file first and then upload it.
Would this work in Jupyter notebook?
You can download files or folder from colab like this:
from google.colab import files
#For the folder you have to zip it first and can only download later on
!zip -r bears.zip data/bears
#Download files
files.download('bears.zip')
You can download files or folder from colab like this:
from google.colab import files
#For the folder you have to zip it first and can only download later on
!zip -r bears.zip data/bears
#Download files
files.download('bears.zip')
What if I wanted to use this piece of code in a python source?
You can download files or folder from colab like this:
from google.colab import files
#For the folder you have to zip it first and can only download later on
!zip -r bears.zip data/bears
#Download files
files.download('bears.zip')
Thanks, I was just looking ways to download a whole folder/sub repository from colab.
Good Work......keep it up
Thanks guy, I block here for almost one hour, thanks again!