accessai / access-niu

DIY NIU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Python 3.6 License Code style: black

access-niu

This repository contains application to train models for Image classification and Regression tasks.

Tasks

  • Create a basic app for training and inference
  • Support for training regression models
  • Support of training multi input/output models
  • Incorporate Bayesian Inference for finding uncertainty in the predictions.
  • Create Docker Image
  • Support for serving the application with gunicorn
  • Anything else?

Installation

pip install access-niu

Training

python -m access_niu.train --template sample/colors/template.yml

Inference

python -m access_niu --projects output

Now use this curl command to parse

curl -X POST \
  http://localhost:8000/parse \
  -F data=@samples/colors/train/red/1.jpg

Docker

###Build image

  • clone the git repo
git clone https://github.com/accessai/access-niu.git
  • Build the docker image
docker build -t access-niu:latest .
  • Run the docker container.

    Note: You can attach a directory as a volume so that you can supply the templates from outside the docker container.

# we will use it as root directory for access-niu application
mkdir accessai
# copy samples folder
cp -r samples accessai/

# train the model
docker run -v $(pwd)/accessai:/accessai access-niu python -m access_niu.train --template samples/colors/template.yml

After running the train command you should get an output folder in the accessai directory

Now start the access_niu server

docker -d run -v $(pwd)/accessai:/accessai -p 8000:8000 access-niu --projects output

Now use this curl command to parse

curl -X POST \
  http://localhost:8000/parse \
  -F data=@samples/colors/train/red/1.jpg

References

  • This project is inspired from RASA-NLU project.

About

DIY NIU

License:Apache License 2.0


Languages

Language:Python 97.3%Language:Dockerfile 2.7%