A jupyter notebook containing code and documentation to train a model on the MNIST dataset as well as a flask web application that allows user draw a digit from 0 -> 9 and submit it. The application will process the image and make prediction from the trained model and return answer.
More Information on technologies used here
The environment setup needed:
-
Install Git to clone the project via repo URL or download the .zip from the website:
git clone https://github.com/butlawr/Emerging-Technologies-Project
-
Install Python 3.7
-
Install & set up a python virtual environment inside the project directory:
- Install with
pip3 install virtualenv
or through your package manager on linux | Windowspip install virtualenv
cd /Emerging-Technologies-Project
python3 -m venve ./venv
| Windowspython -m venv ./venv
- this will create a virtual environment called venv, you may name it what you like.
- Install with
-
To activate virtual environment created inside the project directory:
- Linux:
source venv/bin/activate
| Windows.\venv\Script\activate
- Linux:
-
Install the required python packages listed in the requirements.txt file, this can be done by:
- Note: Regardless of which version of Python you are using, when the virtual environment is activated, you should
use the pip command not
pip3
pip install -r requirements.txt
- Note: Regardless of which version of Python you are using, when the virtual environment is activated, you should
use the pip command not
Before you begin to run this application please make sure you refer to the environment setup explained below.
cd /Emerging-Technologies-Project
- Activate environment:
source venv/bin/activate
| Windows.\venv\Script\activate
- To run the notebook:
jupyter notebook
- Notebook accessible @
http://localhost:8888
- Notebook accessible @
cd /Emerging-Technologies-Projec/
- Activate environment if you have not already:
source venv/bin/activate
| Windows.\venv\Script\activate
cd /webapp
export FLASK_APP=app.py && flask run
| Windowsset FLASK_APP=app.py
,flask run
- Webapp accessible @
http://127.0.0.1:5000/
- Webapp accessible @
This project was developed on my own personal laptop running
- OS: Manjaro Linux
- Kernel: 5.3.12
- Python 3.7.4
- PyCharm 2019.2.5 (Professional Edition)
- Build #PY-192.7142.56, built on November 19, 2019
Testing was carried out on my personal machine listed above as well a AWS Ubuntu Server this machine also hosts the application using uWSGI & Nginx
- OS: Ubuntu 18.04.3 LTS
- Kernel: 4.15.0-1054-aws
- Python 3.6.9
Lastly testing on Windows using Command Prompt terminal:
- OS Windows 10 build 1803
- Python 3.7