I want to deploy a simple TensorFlow model and run it in REST service like Flask. Did not find so far good example on github or here.
I am not ready to use TF Serving as
This github project shows a working example of restoring a model checkpoint and using Flask.
@app.route('/api/mnist', methods=['POST'])
def mnist():
input = ((255 - np.array(request.json, dtype=np.uint8)) / 255.0).reshape(1, 784)
output1 = simple(input)
output2 = convolutional(input)
return jsonify(results=[output1, output2])
The online demo seems pretty quick.