Skip to content

Commit d1756f6

Browse files
committed
use device widgets
1 parent dd43d94 commit d1756f6

File tree

4 files changed

+7
-22
lines changed

4 files changed

+7
-22
lines changed

notebooks/depth-anything/depth-anything.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
"outputs": [],
140140
"source": [
141141
"from pathlib import Path\n",
142+
"\n",
142143
"# Read more about telemetry collection at https://github.com/openvinotoolkit/openvino_notebooks?tab=readme-ov-file#-telemetry\n",
143144
"from notebook_utils import collect_telemetry\n",
144145
"\n",

notebooks/quantizing-model-with-accuracy-control/speech-recognition-quantization-wav2vec2.ipynb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -498,16 +498,11 @@
498498
"metadata": {},
499499
"outputs": [],
500500
"source": [
501-
"import ipywidgets as widgets\n",
501+
"from notebook_utils import device_widget\n",
502502
"\n",
503503
"core = ov.Core()\n",
504504
"\n",
505-
"device = widgets.Dropdown(\n",
506-
" options=core.available_devices + [\"AUTO\"],\n",
507-
" value=\"CPU\",\n",
508-
" description=\"Device:\",\n",
509-
" disabled=False,\n",
510-
")\n",
505+
"device = device_widget(\"CPU\")\n",
511506
"\n",
512507
"device"
513508
]

notebooks/rmbg-background-removal/rmbg-background-removal.ipynb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -297,16 +297,11 @@
297297
}
298298
],
299299
"source": [
300-
"import ipywidgets as widgets\n",
300+
"from notebook_utils import device_widget\n",
301301
"\n",
302302
"core = ov.Core()\n",
303303
"\n",
304-
"device = widgets.Dropdown(\n",
305-
" options=core.available_devices + [\"AUTO\"],\n",
306-
" value=\"AUTO\",\n",
307-
" description=\"Device:\",\n",
308-
" disabled=False,\n",
309-
")\n",
304+
"device = device_widget()\n",
310305
"\n",
311306
"device"
312307
]

notebooks/sound-generation-audioldm2/sound-generation-audioldm2.ipynb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -754,17 +754,11 @@
754754
}
755755
],
756756
"source": [
757-
"import ipywidgets as widgets\n",
757+
"from notebook_utils import device_widget\n",
758758
"\n",
759759
"core = ov.Core()\n",
760760
"\n",
761-
"device = widgets.Dropdown(\n",
762-
" options=core.available_devices + [\"AUTO\"],\n",
763-
" value=\"CPU\",\n",
764-
" description=\"Device:\",\n",
765-
" disabled=False,\n",
766-
")\n",
767-
"\n",
761+
"device = device_widget()\n",
768762
"device"
769763
]
770764
},

0 commit comments

Comments
 (0)