Skip to content

Commit

Permalink
fallback to pprint
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed Jun 11, 2024
1 parent f856c88 commit 9ef4068
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion example/load_model_and_create_your_own.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@
"metadata": {},
"outputs": [],
"source": [
"from devtools import pprint\n",
"from typing import Any\n",
"\n",
"import matplotlib.pyplot as plt\n",
Expand All @@ -228,6 +227,11 @@
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" from devtools import pprint\n",
"except ImportError:\n",
" from pprint import pprint\n",
"\n",
"print(\"\\nThe authors of the model are:\")\n",
"pprint(model.authors)\n",
"print(f\"\\nIn addition to the authors it is maintained by:\")\n",
Expand Down Expand Up @@ -268,6 +272,21 @@
" plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from bioimageio.spec.utils import download\n",
"\n",
"cover_path = download(model.covers[0]).path\n",
"plt.imshow(imread(cover_path))\n",
"plt.xticks([])\n",
"plt.yticks([])\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit 9ef4068

Please sign in to comment.