This is a Flask version of the image classification application, dockerized and deployed on Heroku - https://github.com/VincentLu91/airplanes_or_cars
This is a case study to compare between deployment methods based on the framework applied to each version - Streamlit and Flask.
Dockerized/Flask Heroku app link: https://airplanes-or-cars-docker-flask.herokuapp.com/
(October 8 2022): Starting November, Heroku's free dynos will no longer be available therefore the application can no longer run on Heroku. YouTube demo can be seen below with the application demonstration:
Docker repo: https://hub.docker.com/repository/docker/vincelu299/airplanes-or-cars-docker-flask
Like its Streamlit counterpart, it is limited to resizing images of a certain size - 224 * 224 * 3.
I have written up a blog post on the IG Content Generator in great detail here: https://vincentlu91.github.io/2020/07/06/Image-Classification-Planes-or-Automobiles.html
You can pull the docker image from the Docker Hub repository: https://hub.docker.com/repository/docker/vincelu299/airplanes-or-cars-docker-flask
Then:
docker run -p 5000:5000 airplanes-or-cars-docker-flask:v1
Go to browser and enter: http://localhost:5000/
Libraries and their versions are included in requirements.txt. To install the virtual environment, run the following:
python3 -m venv env # or python -m venv env
source env/bin/activate
pip3 install -r requirements.txt # or pip install -r requirements.txt
At this point the environment should be set up with required libraries to run the application. To run the app, enter:
python app.py
Then in the browser, enter localhost:5000
.
To use the data app, upload an image. Some examples include:
Data app in action: