Thanks very much. It actually helped ![]()
The reason the upload button doesn’t upload the file to local or colab filesystems is because FileUpload only loads the file into memory, never writing it to disk. Writing the file to disk would require additional code/libraries.
Solved this error by:
- Saving a cat image in my google drive
- Changing ‘img = PILImage.create(‘images/chapter1_cat_example.jpg’) to ‘img = PILImage.create(‘gdrive/MyDrive/cat-1.jpg’)
In colab, the pwd (present working directory) seems to be /content. Click on the ‘Files’ tab in the left sidebar in colab to navigate the directory structure. I find that my google drive is mapped to /content/gdrive.
thank you this worked on google colab it seems that line of code is not supposed to run
