Keras-rest-server: A simple rest implementation for loading and serving keras models
About:
This repository contains a very simple server implemented in flask which loads a a simple neural network model trained using Keras from its saved-weights and model.
In this example a very simple case of XOR is considered.
Getting started:
- Install Anaconda:
https://docs.continuum.io/anaconda/install
- Clone this repository
git clone https://github.com/ansrivas/keras-rest-server.git
cd keras-rest-server
- Create a new environment ( Change python=2 or python=3) and activate it:
conda create --name keras-server -y python=2
source activate keras-server
- Install all the dependencies:
conda env update -n keras-server --file requirements.txt
- To remove the environment run:
conda remove -n keras-server --all -y
Usage
Run to generate pickle files:
python createpickles.py
http://localhost:7171)
Run the server (defaults topython server.py
Send a post request to this server to test your model
python client.py