Jun-02-2020, 12:40 PM
You can import a dataset from Kaggle to the colab without downloading it on the Pc and with impressive high speed. Follow the steps below:
1. Goto the Kaggle account and generate a token. You can see a kaggle.json file downloaded.
2.Mount your hard disk
3.upload the kaggle.json file.
4.Next type this and run in a cell
5.Next run this code,and only once
1. Goto the Kaggle account and generate a token. You can see a kaggle.json file downloaded.
2.Mount your hard disk
3.upload the kaggle.json file.
4.Next type this and run in a cell
!pip install -q kaggle
5.Next run this code,and only once
! mkdir ~/.kaggle ! cp kaggle.json ~/.kaggle/6.Now download using this command.I am going to paste an example with the code
!kaggle [i]datasets[/i] download -d [i]alessiocorrado99/animals10[/i]Note that the text written in italic can be different for you.Here i am downloading a dataset from dataset section by using the API command which you can get from the kaggle.It can be like this too
! kaggle competitions download -c 'name-of-competition'