Lesson 2: Bears Production Project

Hi guys,

I’m enjoyed a lot of Lesson 2 (listen it for a couple time). I really glad that you start thinking about production side of Machine Learning, and how it is going to be used for end-users.

I’m a web developer, so the production part was a bit confusing for me, so before starting experimenting with my own ideas I decide to test how bear-prediction will work on production.

I was using the most popular web-framework for Python - Django

Here is a very minimalistic version of how it work: http://fastai-bears.lyabah.com/ - upload a picture and get all the prediction.

Here is a source code https://github.com/oduvan/fastai-find-bears feel free to add pull-request, but in education purposes I keep it as simple as possible.

How it works for me:

project bears, the most simple one, contains 2 folders:

  • learn - one that you will use on GPU machine
  • website - one that you will use on CPU machine

Then, how it works.

  1. clone the project on GPU machine, close to fastai tutors, and use teach notebook
  2. after making an export you need to commit a new generated data to git repo and push it on github
  3. close the project on CPU machine and run in your

docker-compose start

  1. that’s it.

Happy Coding

PS: Here is the file you might want to edit https://github.com/oduvan/fastai-find-bears/blob/master/bears/website/website/views.py

PPS: If you need I can make a video intro of how it works.