I understand there are many people who are in favor of using Jupyter Notebook, powered by IPython library. I am, however, prefer to work in PyCharm and write Python script.
When I want to reduplicate codes written in Jupyter Notebook, I found sometimes they use functions from IPython. For example, this example:
from fastai.vision.widgets import *
cleaner = ImageClassifierCleaner(learn)
cleaner
Here cleaner is a class that has widgets that can be displayed in Juypter Notebook. If I run the function in a Python script, then the widget will not be shown. I tried to fix it use the following codes:
from fastai.vision.widgets import *
cleaner = ImageClassifierCleaner(learn)
from IPython.display import display
display(cleaner.widget)
plt.show()
It does not work. Any ideas? Thanks.
ps1: use print(cleaner):
<PIL.Image.Image image mode=RGBA size=227x128 at 0x7F99C4F97470>
<PIL.Image.Image image mode=RGBA size=226x128 at 0x7F99C3679898>
<fastai.vision.widgets.ImageClassifierCleaner object at 0x7f99f803ec88>