Making a block diagram

How do we create the block diagram flow charts that we see in the Jupyter NBs that Jeremy presents?
In the image below where does gv come from? What library do I need to import to use that?

1 Like

it’s from utils.py in fastbook repo. I haven’t checked how we can get it just by installing fastai only though. You’d get this if you do from fastbook import *

But in general, if you don’t know where a function is coming from, just do <func>? or help(<func>) or doc(func) to go straight to the fastai docs.

You can also view the source code directly by doing <func>?? :slight_smile:

3 Likes

Like @kevad mentioned, the gv function comes from utils.py. It’s effectively just exporting a graphing library called graphviz, which one can install with mamba and pip as well.

2 Likes