- Use
git cloneto clone the repository - Use
uv syncto install the dependencies in a virtual environment
- Open the notebook in Colab
- Use
git cloneto clone the repository (to get helper files, assets, and datasets) - Run
%cd <path to the repository> - Sync dependencies from
pyproject.tomlinto the Colab system environment:!uv sync --system(notice the!prefix tells notebooks this is a shell command)
Remember to save your work. Any files created in Colab will be lost if you don't save them elsewhere (Download).
First, obtain your API token from Kaggle:
- Go to Kaggle Settings
- Scroll to the API section and click Create New Token
- Copy that token and insert it as a Colab secret under with the label
KAGGLE_API_TOKEN
import os
# This reads your colab secrets
# and set the environment variables on them
from google.colab import userdata
os.environ['KAGGLE_KEY'] = userdata.get('KAGGLE_API_TOKEN')
os.environ['KAGGLE_USERNAME'] = "KAGGLE_COLAB"
# Example Dataset
dataset_name = "shuyangli94/food-com-recipes-and-user-interactions"
!kaggle datasets download -d {dataset_name}