Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upload local files using Google Colab

Trying to upload local files using Google Collaboratory this way:

from google.colab import files uploaded = files.upload() 

I get the following error:

Upload widget is only available when the cell has been executed in the current browser session. Please rerun this cell to enable.

I rerun the cell but it doesn't work...

like image 348
Alexandre2R Avatar asked Jan 24 '18 10:01

Alexandre2R


People also ask

Can I use Google colab locally?

Colaboratory lets you connect to a local runtime using Jupyter. This allows you to execute code on your local hardware and have access to your local file system.

How do I upload a folder to Google colab from local machine?

On Google Drive, create a new folder and call it Kaggle. Open this folder by double-clicking on it and upload kaggle. json file. Next, open a Colab notebook and run the code below to mount the Drive onto Colab's file system.


2 Answers

It sounds like third-party cookies may be disabled in your browser, see https://github.com/googlecolab/colabtools/issues/17.

The setting is under chrome://settings/content/cookies.

like image 69
blois Avatar answered Sep 28 '22 01:09

blois


You can whitelist the following cookies in Chrome:

https://[*.]googleusercontent.com:443 
like image 35
Guido Avatar answered Sep 28 '22 02:09

Guido