Flask web application for deploying a digit classifier model built using
PyTorch.
Only works for digits from 0 - 9.
$ pip3 install -r requirements.txt
$ python3 run.py
Test Accuracy of 0: 99%
Test Accuracy of 1: 99%
Test Accuracy of 2: 99%
Test Accuracy of 3: 99%
Test Accuracy of 4: 99%
Test Accuracy of 5: 99%
Test Accuracy of 6: 98%
Test Accuracy of 7: 98%
Test Accuracy of 8: 99%
Test Accuracy of 9: 98%
Test Accuracy : 99%
architecture.py
Contains the classifier model's architecture class necessary when
loading the model's checkpoint.
Also contains two methods, get_model() , which loads and returns the model,
and get_tensor() method with takes as a parameter image bytes
from uploaded image, transforms the image's size and color to grayscale,
then returns a tensor.
inference.py
Contains the get_image_label() method which passes image bytes through
the get_tensor() method, the returned tensor through the model and
returns the predicted label .