diff --git a/notebooks/jax-vit-mixer/jax-vit-mixer.ipynb b/notebooks/jax-vit-mixer/jax-vit-mixer.ipynb index 447a5b2f2df..4703b2ef2af 100644 --- a/notebooks/jax-vit-mixer/jax-vit-mixer.ipynb +++ b/notebooks/jax-vit-mixer/jax-vit-mixer.ipynb @@ -237,8 +237,10 @@ "metadata": {}, "outputs": [], "source": [ - "!wget https://storage.googleapis.com/bit_models/ilsvrc2012_wordnet_lemmas.txt\n", - "imagenet_labels = dict(enumerate(open(\"ilsvrc2012_wordnet_lemmas.txt\")))" + "from notebook_utils import download_file\n", + "\n", + "imagenet_labels_path = download_file(https://storage.googleapis.com/bit_models/ilsvrc2012_wordnet_lemmas.txt\n", + "imagenet_labels = dict(enumerate(open(imagenet_labels_path))))" ] }, { @@ -257,8 +259,8 @@ "outputs": [], "source": [ "resolution = 224 if model_name.startswith(\"Mixer\") else 384\n", - "!wget https://picsum.photos/$resolution -O picsum.jpg\n", - "img = PIL.Image.open(\"picsum.jpg\")" + "image_path = download_file(f\"https://picsum.photos/{resolution}\", filename=\"picsum.jpg\")\n", + "img = PIL.Image.open(image_path)" ] }, {