How to define my own path specially when I work on Collab and my data is in my drive?

Hi and Thank you for spending the time to read this topic!
I was experimenting with the first and second session of the course and then I decide to use fastAI for my own project which is doing regression given a tabular CSV dataset and I tried to use untar_data() and it obviously did not work(I know it was meant to use only for fastAI course). then I tried several times to find the path to my file on google drive but it would not work after path = Path(‘content/gdrive/My Drive’).
does anyone know how I can solve that?
Thanks

Hi HamedGholami

You put the data on your Google drive and then

from fastai.vision.all import *
path = Path(‘content/gdrive/My Drive/Colab Notebooks’)
!ls -al ‘/content/gdrive/My Drive/Colab Notebooks’

You can put your data in Colab Notebooks and then data loader will access your Google Drive.

The alternative is
%cd ‘/content/gdrive/My Drive/Colab Notebooks’

Or if you want your data on the machine with the GPU
!mkdir /mycolabfolder
use !cp '/content/gdrive/My Drive/Colab Notebooks/MYFILENAME /mycolabfolder
and then work on the colab machine but remember to copy it back.

Regards Conwyn

thanks a lot. :raised_hands: