Skip to content
/ peckis Public

Backend to drawing doodles and letting neural network do the guesswork

Notifications You must be signed in to change notification settings

mseimys/peckis

Repository files navigation

Peckis backend

ML backend that you can train to recognize your doodles.

Running

You need poetry and all the dependencies installed. Tensorflow 2.0 should be installed via pip since poetry can't handle it:

poetry install
poetry run pip install tensorflow

Train a model for serving

poetry run python -m models.numbers

A folder serving should appear in root directory. To serve this model via Tensorflow Serving container run serving.sh.

Workers and API

Run celery workers via workers.sh. Execute run.sh to start Flask API.

Web frontend

Launch https://github.com/mseimys/peckis-ui frontend to do some experiments.

Deployment

Create a docker network:

docker network create peckis

Build tensorflow/serving docker image and run it:

# Remember to train your model first
docker build -t serving -f Dockerfile.serving .
docker run --rm -it --network peckis --name peckis-serving serving

Build and run workers and api:

docker build -t peckis .
docker run --rm -it -p 5000:5000 --network peckis -e SERVING_HOST=http://peckis-serving:8501 peckis

Build and run peckis UI:

docker build --build-arg GUESS_API="https://seimys.com/peckis/api/guess" --build-arg PUBLIC_URL="/peckis" -t peckis-ui .
docker run --rm -it -p 8000:80 peckis-ui

About

Backend to drawing doodles and letting neural network do the guesswork

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published