This repo is a demonstration of using MLChain to serve a simple MNIST Classification model
git clone https://github.com/Techainer/mnist-mlchain-examples
cd mnist-mlchain-examples
pip3 install -r requirements.txt
Take a look at the configuration file mlconfig.yaml
and see if you need to change anything.
Then run
mlchain run
An API endpoint will be served at 127.0.0.1:9001/call/frontend
And a frontend will be served at 127.0.0.1:9001/call/frontend
You also have a Swagger UI at 127.0.0.1:9001
to see all the API endpoint in details and able to try it out immediately
To interact with the served API you can use Postman or the webpage already host above.
With Python, you can take a look at the test.py
script to see how to use MLChain's Python Client
class to communicate with the served API by MLChain in a very native and Pythonic manner.
We also show you how to use MLChain's workflow
to take increase performance of your logic flow.
Run
python3 server_flask.py
An API endpoint will be served at 127.0.0.1:3000/predict
And a frontend will be served at 127.0.0.1:3000