This is an app that comprises of dockerized tensorflow serving model and flask server that communicate together using docker-compose to predict the emotion of a text
The two docker images can be found here at Docker Hub
Demo |
---|
- Docker, Docker-Compose
- Tensorflow, Tensorflow Estimator, Tensorflow-Serving, Google-Colab
- Giphy API
- Flask
- React, Redux, React-Redux, React Bootstrap
This repo contains four branches which are the following
master
branch - Contains thedocker-compose.yml
file. This is used to start the two containers from the tensorflow-serving and flask server docker image and to also allow communication between them. See the Installation and Usage section on how to get started
version: "3"
services:
tf-model:
image: jama5262/tensorflow-emotion-text-detector
ports:
- 8501:8501
flask-server:
image: jama5262/flask-tensorflow-emotion-text-detector
ports:
- 5000:5000
depends_on:
- tf-model
-
colab-notebook
branch - This contains the notebook used tocreate
andexport
the tensorflow estimator model -
flask-server
branch - Contains the flask server-side that hosts the react build files and the predict emotion endpoint. -
react-client
branch - And this branch contains the react client-side UI
Clone this repo from the master
branch to your local machine using https://github.com/jama5262/tensorflow-emotion-text-detector.git
After cloning, cd
into the project
Great the project has been setup 👍
Before you start using, please check that the ports 5000
and 8501
are not in use
Port 5000
is used by flask server and port 8501
is used by tensorflow serving
To start using it locally, run the following docker
command
docker-compose up
After that check your http://localhost:5000
Reach out to me at one of the following places!
- Email at [email protected]
- Twitter timedjama5262
MIT License
Copyright (c) 2019 Jama Mohamed
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.