vilas m
vilas m

Reputation: 15

How to set up kaggle api in colab

I am uploading the kaggle.json file for every new session in Google Colab. Is there any way to permanently configure it using Google Drive.

Upvotes: 1

Views: 196

Answers (1)

korakot
korakot

Reputation: 40918

You can save kaggle.json in gdrive, mount it, then download from there.

You can also embed kaggle.json directly in Colab.

!mkdir ~/.kaggle
!echo '{"username":"korakot","key":"xxxxxxxxxxxxxxxx"}' > ~/.kaggle/kaggle.json
!chmod 600 ~/.kaggle/kaggle.json

If your notebook is private(not shared), this is the most convenient way.

Upvotes: 2

Related Questions