· 6 years ago · Sep 30, 2019, 10:12 PM
1#Upload your json file containing API key to kaggle
2from google.colab import files
3files.upload()
4
5#Check if it has actually been uploaded
6!ls -lha kaggle.json
7
8!pip install -q kaggle
9
10# The Kaggle API client expects this file to be in ~/.kaggle,
11# so move it there. This can be stored in native directory of google drive or on your drive
12!mkdir -p ~/.kaggle
13!cp kaggle.json ~/.kaggle/
14
15# This permissions change avoids a warning on Kaggle tool startup.
16!chmod 600 ~/.kaggle/kaggle.json
17
18#Using keyword 'plants' to search for the data
19!kaggle datasets list -s plants
20
21#Downloading the dataset
22!kaggle datasets download -d emmarex/plantdisease
23
24!unzip plantdisease.zip