Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Colab can't find a file

training_dataset_file = open('C:/Users/kbg04289/Desktop/mnist_train.csv', 'r')

I tried several methods like 'making address with \' and checking path.

Only google colab makes trouble, however jupyter notebook and visual studio code does well.

like image 982
jun seung Avatar asked Dec 22 '25 18:12

jun seung


1 Answers

Colab doesn't have access to your local drive.

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

This will prompt you to upload a file to Colab and you'll then be able to do the following once the upload is complete:

training_dataset_file = open(uploaded_files['<filename>'], 'r')
like image 86
Rayan Hatout Avatar answered Dec 24 '25 08:12

Rayan Hatout