Skip to content

Commit

Permalink
Fix image print for auto feedback from code notebook (microsoft#1389)
Browse files Browse the repository at this point in the history
* Add .notebook folder to gitignore

* Add the import of display (IPython) and call it to display the chart

* Remove the update of .gitignore
  • Loading branch information
pmalarme authored Feb 2, 2024
1 parent 043c7f9 commit 710862d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions notebook/agentchat_auto_feedback_from_code_execution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"from typing import Dict, Union\n",
"\n",
"from IPython import get_ipython\n",
"from IPython.display import Image\n",
"from IPython.display import display, Image\n",
"\n",
"import autogen\n",
"\n",
Expand Down Expand Up @@ -498,7 +498,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -515,7 +515,8 @@
],
"source": [
"try:\n",
" Image(filename=\"coding/stock_price_ytd.png\")\n",
" image = Image(filename=\"coding/stock_price_ytd.png\")\n",
" display(image)\n",
"except FileNotFoundError:\n",
" print(\"Image not found. Please check the file name and modify if necessary.\")"
]
Expand Down Expand Up @@ -813,7 +814,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.10.13"
},
"vscode": {
"interpreter": {
Expand Down

0 comments on commit 710862d

Please sign in to comment.