A pretty and customizable web app to deploy your Deep Learning Models with ease.
- Clone this repo
- Install requirements
- Run the script
- Go to http://localhost:5000
- Done! 🎉
- Enhanced, mobile-friendly UI
- Support image drag-and-drop
- State-of-the-art custom-made text preprocessing
- Use vanilla JavaScript, HTML and CSS. Remove jQuery and Bootstrap
- Upgrade Docker base image to Python 3
With Docker, you can quickly build and run the entire application in minutes 🐳
# 1. First, clone the repo
$ git clone https://github.com/spykard/Deep-Learning-WebApp.git
$ cd Deep-Learning-WebApp
# 2. Build Docker image
$ docker build -t keras_flask_app .
# 3. Run!
$ docker run -it --rm -p 5000:5000 keras_flask_app
Open http://localhost:5000 and wait till the webpage is loaded.
It's easy to install and run the app on your computer.
# 1. First, clone the repo
$ git clone https://github.com/spykard/Deep-Learning-WebApp.git
$ cd Deep-Learning-WebApp
# 2. Install Python packages
$ pip install -r requirements.txt
# 3. Run!
$ python app.py
Open http://localhost:5000 and have fun. 😃
It's also easy to customize and include your own models in this app.
Details
Place your trained .h5
file saved by model.save()
under the models directory.
Change the code in app.py and make the appropriate changes in the preprocessing modules (deeplearning_image.py and deeplearning_text.py) to fit your model's needs.
See Keras applications for more available models, such as DenseNet, MobilNet, NASNet, etc.
Check this section in app.py.
Modify files in templates
and static
directory.
index.html
implements the UI and main.js
implements all the behaviors.
To deploy it for public use, you need to have a public linux server.
Details
Run the script and hide it in background with tmux
or screen
.
$ python app.py
You can also use gunicorn instead of gevent
$ gunicorn -b 127.0.0.1:5000 app:app
For more deployment options, check here.
To redirect the traffic to your local app.
Configure your Nginx .conf
file.
server {
listen 80;
client_max_body_size 20M;
location / {
proxy_pass http://127.0.0.1:5000;
}
}