1、点击用户头像,点击Settings:
2、找到API,点击create new token,将自动下载kaggle.json:
3、在用户目录下创建.kaggle文件夹,并将下载的kaggle.json文件移动到该文件夹:
cd ~
mv Downloads/kaggle.json ~/.kaggle/
4、同意该数据集的使用规则
5、在虚拟环境安装kaggle:
conda install kaggle
6、运行脚本:
kaggle competitions download tweet-sentiment-extraction
sudo unzip tweet-sentiment-extraction.zip -d /mnt/tweet-sentiment-extraction/kaggle datasets download abhishek/bert-base-uncased
sudo unzip bert-base-uncased.zip -d /mnt/bert-base-uncased/
下载结果:
Archive: tweet-sentiment-extraction.zipinflating: /mnt/tweet-sentiment-extraction/sample_submission.csv inflating: /mnt/tweet-sentiment-extraction/test.csv inflating: /mnt/tweet-sentiment-extraction/train.csv Archive: bert-base-uncased.zipinflating: /mnt/bert-base-uncased/config.json inflating: /mnt/bert-base-uncased/pytorch_model.bin inflating: /mnt/bert-base-uncased/vocab.txt