Giter VIP home page Giter VIP logo

fen_gen's Introduction

FENGEN

demo

Generate FEN strings given a chess board image.

About

Web server

FENGEN handles the image uploads, FEN-to-board state translation, and communication with the process running predict.py.

Prediction

The predict.py script is ran by a GenServer worker/process, which is "replicated", and managed by poolboy. So task distribution is handled by it. The results are flushed to stdout, which notifies the port that there's a prediction that has been made.

Deploy to DO

Deploy to DO

Prod Setup

Container image is used to deploy to DO. Dependencies are handled by nix. There are better ways to shrink the image size (erlang & tensorflow are rather large), but this will have to do for now.

Dev Setup

Ensure you have the nix package manager. If you're using NixOS then you can skip this.

curl -L https://nixos.org/nix/install | sh

Activate the nix environment to fetch necessary dependencies.

# If you don't need the libraries/packages from the external environment
nix-shell --pure

# Otherwise
nix-shell

If you want to open your IDE/text editor within the environment, you can do so within it.

# If you're using VSCode. Unfortunately, you'll need more 
# configuration if you've installed it through Flatpak.
code .

Setup the remaining things.

mix setup

Run the server

mix phx.server

Now you can visit localhost:4000 from your browser.

License

FENGEN's code is licensed under MIT.

Credits

fen_gen's People

Contributors

sekunho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fen_gen's Issues

Move port to genserver

Currently it starts a new process for the predict.py script for each instance of the page_live process. Which is kinda bad since I only really need one anyway.

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.