Skip to content

Commit c9f12ed

Browse files
authoredMar 24, 2025··
use str path in torchvision notebook (#2834)
CVS-161744
1 parent 71f9b4a commit c9f12ed

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎notebooks/torchvision-zoo-to-openvino/convnext-classification.ipynb

+7-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,13 @@
6666
},
6767
"outputs": [],
6868
"source": [
69+
"import platform\n",
70+
"\n",
6971
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu torch torchvision\n",
70-
"%pip install -q \"openvino>=2023.1.0\""
72+
"%pip install -q \"openvino>=2023.1.0\"\n",
73+
"\n",
74+
"if platform.system() == \"Darwin\":\n",
75+
" %pip install -q \"numpy<2.0\""
7176
]
7277
},
7378
{
@@ -124,7 +129,7 @@
124129
"\n",
125130
" with open(img_path, \"wb\") as f:\n",
126131
" f.write(r.content)\n",
127-
"image = read_image(img_path)\n",
132+
"image = read_image(str(img_path))\n",
128133
"display(transforms.ToPILImage()(image))"
129134
]
130135
},

0 commit comments

Comments
 (0)
Please sign in to comment.