LucasRoesler / name-classifier

Sample OpenFaaS function that will try to guess your nationality based on your name, using pytorch
10 stars 5 forks source link

Classify Name

Training

After adding more datat to /classify/function/data/names, you can retrain the model using

cd classify/
python train.py
cd -

Build

faas-cli template pull https://github.com/LucasRoesler/pydatascience-template.git
faas-cli build classify --tag sha

Quick test

docker run -it -p 8080:8080 theaxer/classify:latest
curl -X POST http://localhost:8080 -d "Bob"

Deploy

conda env create -f devenvironment.yml
faas-cli deploy -f ./stack.yml --gateway=<GATEWAY> --tag sha