All Projects → ahmed-mez → keras-rest-API

ahmed-mez / keras-rest-API

Licence: other
A scalable Flask API to interact with a pre-trained Keras model.

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to keras-rest-API

sgi
Socket Gateway Interface
Stars: ✭ 16 (+14.29%)
Mutual labels:  uwsgi
Django Uwsgi Taskmanager
Django application to monitor and manage long and/or recurring tasks through uWSGI.
Stars: ✭ 22 (+57.14%)
Mutual labels:  uwsgi
Crawlerhot
今日热榜 抓取网站热榜信息,并且前端进行展示
Stars: ✭ 158 (+1028.57%)
Mutual labels:  uwsgi
Pyflame
🔥 Pyflame: A Ptracing Profiler For Python. This project is deprecated and not maintained.
Stars: ✭ 2,930 (+20828.57%)
Mutual labels:  uwsgi
Opman Django
💯✅自动化运维平台:CMDB、CI/CD、DevOps、资产管理、任务编排、持续交付、系统监控、运维管理、配置管理
Stars: ✭ 539 (+3750%)
Mutual labels:  uwsgi
Flask Restful Authentication
An example for RESTful authentication using nginx, uWSGI, Flask, MongoDB and JSON Web Token(JWT).
Stars: ✭ 63 (+350%)
Mutual labels:  uwsgi
fano
Pascal web application framework
Stars: ✭ 21 (+50%)
Mutual labels:  uwsgi
Uwsgi Nginx Flask Docker
Docker image with uWSGI and Nginx for Flask applications in Python running in a single container. Optionally with Alpine Linux.
Stars: ✭ 2,607 (+18521.43%)
Mutual labels:  uwsgi
Cutelyst
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
Stars: ✭ 671 (+4692.86%)
Mutual labels:  uwsgi
Django Init
Project template used at Fueled for scaffolding new Django based projects. 💫
Stars: ✭ 126 (+800%)
Mutual labels:  uwsgi
Docker Django Nginx Uwsgi Postgres Tutorial
Docker + Django + Nginx + uWSGI + Postgres 基本教學 - 從無到有 ( Docker + Django + Nginx + uWSGI + Postgres Tutorial )
Stars: ✭ 334 (+2285.71%)
Mutual labels:  uwsgi
Uwsgi Nginx Docker
Docker image with uWSGI and Nginx for applications in Python 3.5 and above and Python 2.7 (as Flask) in a single container. Optionally with Alpine Linux.
Stars: ✭ 466 (+3228.57%)
Mutual labels:  uwsgi
Shorty
🔗 A URL shortening service built using Flask and MySQL
Stars: ✭ 78 (+457.14%)
Mutual labels:  uwsgi
Flask Uwsgi Websocket
🔌 High-performance WebSockets for your Flask apps powered by uWSGI.
Stars: ✭ 259 (+1750%)
Mutual labels:  uwsgi
Docker Django
A project to get you started with Docker and Django.
Stars: ✭ 170 (+1114.29%)
Mutual labels:  uwsgi
is-osm-uptodate
Find outdated nodes in OpenStreetMap
Stars: ✭ 16 (+14.29%)
Mutual labels:  uwsgi
Uwsgi cli
easy uwsgi cli tools !!!
Stars: ✭ 48 (+242.86%)
Mutual labels:  uwsgi
webtodotxt
Web-based GUI to manage a Todo.txt file
Stars: ✭ 30 (+114.29%)
Mutual labels:  uwsgi
Uwsgi Sloth
Realtime uwsgi log file analyzer, slow requests analyzer.
Stars: ✭ 203 (+1350%)
Mutual labels:  uwsgi
Pyblog
Pyblog 是一个简单易用的在线 Markdown 博客系统,它使用 Python 的 flask 架构,理论上支持所有 flask-sqlalchemy 所能支持的数据库。 编辑器使用的是 editor.md。当前版本(v2.0)支持且仅支持 python3! Python 的 Markdown to HTML 编译器使用的是 Mistune! Just so!
Stars: ✭ 113 (+707.14%)
Mutual labels:  uwsgi

Deep Learning API using Flask, Keras, Redis, nginx and Docker

A scalable Flask API to interact with a pre-trained Keras model.

Overview

The API uses Redis for queuing requests, batch them and feed them to the model to predict the classes then responds the client with a JSON containing the result of his request (classes with top probabilities). In order to support heavy load and to avoid multiple model syndrome, the model load and prediction, and the receiving/sending requests run independently of each other on different processes.

Please note that the model used in this project (which is a simple digit recognition OCR model) is just an example, as the main purpose of the project is the development and deployment of the API.

Deployment

The setup consists of 3 containers:

  1. Flask app with uWSGI
  2. Redis
  3. nginx

All 3 containers are based respectively on the official docker images of python:2.7.15, Redis and nginx.

Setup

We just need to build the images and run them using docker-compose:

$ docker-compose build
$ docker-compose up

A head over http://localhost:8080 should show the following message on the web page: Welcome to the digits OCR Keras REST API

Example

We can try to submit POST requests to the API on the /predict entry point:

$ curl -X POST -F [email protected] 'http://localhost:8080/predict'

The API response :

{
	"predictions": [
		{
			"label": "4",
			"probability": 0.9986100196838379
		},
		{
			"label": "9",
			"probability": 0.001174862147308886
		},
		{
			"label": "7",
			"probability": 0.00009050272637978196
		}
	],
	"success": true
}

TODO

  • Tests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].