点击用户头像,点击Settings:
找到API,点击create new token,将自动下载kaggle.json:
在用户目录下创建.kaggle文件夹,并将下载的kaggle.json文件移动到该文件夹:
bash
cd ~
mv Downloads/kaggle.json ~/.kaggle/
在虚拟环境安装kaggle:
bash
conda install kaggle
运行脚本:
bash
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/
下载结果:
bash
Archive: tweet-sentiment-extraction.zip
inflating: /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.zip
inflating: /mnt/bert-base-uncased/config.json
inflating: /mnt/bert-base-uncased/pytorch_model.bin
inflating: /mnt/bert-base-uncased/vocab.txt