Skip to Content

How to deploy a deep learning model with binder and voila

This tutorial explains how to use voila and binder to deploy a deep learning model for free.

The first 5 steps are about creating the deep learning model.

I trained the deep learning model in a Jupiter notebook in google Colab, with Fast AI, as explained in the lectures of 2020.

  1. download images by using Big Image Search Api;

  2. manually remove the not relevant images;

  3. apply Data Augmentation;

  4. train the deep learning model;

  5. Save export.pkl

  6. save all the script including the export.pkl file in a Github repository.

In this case the repository is that I am going to use as an example.

To push to GitHub the file export.pkl which is bigger than 25 mega use git-lfs.

First, if you have the double step authentication active on Github, add a token as explained here:

On local terminal:

  • cd Desktop

  • git clone

  • brew install git-lfs (I am using a Mac)

  • cd your_local_directory (in my case emotion-faces)

  • git lfs install

  • git init

  • git lfs track “export.pkl”

  • git add .gitattributes export.pkl

  • git commit -m “add here a comment”

  • git push -u origin master

  1. deploy in
  1. finally I saved the link of the deployed application in a friendly short link: