Please follow the steps below to download and use kaggle data within Google Colab
Install kaggle on Google Colab
- Login and go to your account.
- Scroll to API section and Click Create New API Token. It will download
kaggle.json
file on your machine.
- Go to your Google Colab project file and run the following commands
!pip install -q kaggle
from google.colab import files
files.upload()
# Choose the kaggle.json file that you downloaded
!mkdir '/root/.kaggle'
!cp kaggle.json '/root/.kaggle'
!chmod 600 /root/.kaggle/kaggle.json
!kaggle datasets list
# That's all ! You can check if everything's okay by running this command.
Download Data
Now you can download any dataset in kaggle. For example we will download VinBigData Original Image Dataset.
Click to the menu and click Copy API command
Paste the command to Google Colab and run.
!kaggle datasets download -d awsaf49/vinbigdata-original-image-dataset
Unzip and using it
!unzip -q vinbigdata-original-image-dataset.zip