Skip to content

Commit

Permalink
Crossplatforming
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandr-mokrov committed Nov 7, 2024
1 parent 31bcc0f commit ab20f29
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions notebooks/jax-vit-mixer/jax-vit-mixer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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))))"
]
},
{
Expand All @@ -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)"
]
},
{
Expand Down

0 comments on commit ab20f29

Please sign in to comment.