Character generator based on LSTM (Tensorflow in Python) with Webapp (Node.js) wrapped in Docker container
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
generator
server
.dockerignore
.gitignore
.travis.yml
Dockerfile
Dockerrun.aws.json
README.md
app_screenshot.jpg
docker_push.sh

README.md

Char-RNN-TensorFlow

Build Status

Blog post explaining it all Run Tensorflow scripts from Node.js server deployed on AWS as Docker container

Character generator using recurrent neural network (RNN). Also Node.js server used to provide HTTP API for training RNN and then generating samples from saved checkpoints.

Homepage screenshot

Generator

Forked from hzy46/Char-RNN-TensorFlow and is in separate directory (generator/) now to avoid confusion. It has its own documentation in generator/README.md.

Server

Trivial Node.js server used to store incoming training data and call python scripts to train and generate text. Read about it in server/README.md

Development

Both server and generator are expected to run in Docker
and running image locally would replicate production environment. You could also run server directly but then need to be sure that all python dependencies are installed locally.

a) Build and run Docker image

  • To build container image: docker build -t <some_name> .
  • To run above image:
docker run --rm -ti \
    -e "MYSQL_HOST=docker.for.mac.localhost" \
    -e "MYSQL_USER=root" \
    -e "MYSQL_PASSWORD=" \
    -e "MYSQL_DATABASE=rnn_generator" \
    -p 8080:8080 <some_name>

b) Run using virtualenv

New virtualenv

  • Create new environment in dir venv - $ virtualenv -p python3 venv
  • Activate environment - $ source venv/bin/activate
  • Install dependencies - (venv) $ pip install -r requirements.txt

Existing virtualenv

  • Activate environment - $ source venv/bin/activate
  • Use Node.js v10 (venv) $ nvm use 10
  • run server (venv) $ node server/server

Your feedback

You are free to open issues if there is anything bothering you, I'll read through and will make best effort to fix/reply ASAP.