Jupyter notebook tutorial - Using the full notebook or the h5 file?

Hi,

In the case of an already trained ML model (specially when dealing with Deep Learning models that can be very time consuming to execute from scratch), what would be the right way to go?

  1. Add the Anvil code in a cell at the end of the notebook that creates and trains the model, and execute the whole thing? or
  2. Create a new notebook, load the .h5 file with the pre-trained model, and then add the Anvil code to pass the input to the model and retrieve the results?

Background

I’m working on the tutorial on creating a front end for Jupyter notebook.

In the tutoria,l Meredydd uses an existing notebook from Kaggle, and adds the Anvil code at the end in a new cell.
I believe (although not 100% sure) it is not the same notebook that you can download now, when you follow the link to the Kaggle page, because I searched some text you can see in the tutorial and it is not found in the downloaded notebook.
An this put me to think, and triggered my question:

Thank you !!

Hi @rfernandez2007 – yeah, when I’m doing that as a demo (eg conferences) I comment out the training steps and uncomment the cell that loads the .h5 file!

2 Likes

Hi Meredydd,
Thank you for your answer!
Regards!
Ricardo