Skip to content

A demonstration of using MLChain to serve a simple MNIST Classification model

Notifications You must be signed in to change notification settings

Techainer/mnist-mlchain-examples

Repository files navigation

MNIST MLChain Examples

This repo is a demonstration of using MLChain to serve a simple MNIST Classification model

Setup

git clone https://github.com/Techainer/mnist-mlchain-examples
cd mnist-mlchain-examples
pip3 install -r requirements.txt

Serve using MLChain

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

mlchain_postman

And a frontend will be served at 127.0.0.1:9001/call/frontend

mlchain_web

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

swagger

Interact with the Served API

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.

Serve using Flask

Run

python3 server_flask.py

An API endpoint will be served at 127.0.0.1:3000/predict

flask_postman

And a frontend will be served at 127.0.0.1:3000

flask_web

You can read more about mlchain-python in here

About

A demonstration of using MLChain to serve a simple MNIST Classification model

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published