Saving widget state in notebook

Hi, I have made a panel dashboard inline in a notebook that I am planning on distributing to multiple students for a workshop. We would like the students to be able to save and upload the entire notebook to a repository so others can reproduce their work, but there is a bit of a tricky problem I have been trying to overcome. Namely, the widget state doesn’t get saved when saving the notebook or rendering it as HTML. Rather, it only shows the default values.

To get around this, I need to rerun the cell that displays the widgets even though it doesn’t actually change the output. Essentially, the state of the dashboard / widgets after running the cell is what gets saved. I’d rather not have to make the students remember to do this when they need to distribute their notebooks, so I’d like to know if there are other or better workaround available. Thanks!

I think this is due to how nbconvert (used when exporting a notebook) works; it grabs the first rendering of the cell, but not any later updates. I don’t know of any workaround, but maybe someone else does!