GithubHelp home page GithubHelp logo

mseimys / peckis Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 1.36 MB

Backend to drawing doodles and letting neural network do the guesswork

Home Page: https://seimys.com/peckis

Python 92.27% Shell 2.75% Dockerfile 4.98%
doodles tensorflow celery flask poetry

peckis's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.