A TensorFlow seq2seq project trains Chinese couplet models and serves them through server.py or Docker for interactive upper-to-lower line pairing.
Overview
A sequence-to-sequence model generates Chinese couplets (对对联). Training code in couplet.py expects a vocabulary file and paired dataset, with TensorBoard reporting loss and BLEU during long GPU runs.
After training, server.py loads weights and exposes a web service that returns lower lines for user upper lines. Docker build and run steps mount model paths into the container.
Published examples show classical-style matching lines for diverse upper inputs. A public demo site is available for trying the model without local setup.
Requirements include TensorFlow and Python 3.6 per the documented environment.
Key features
- Seq2seq couplet training
- TensorBoard loss tracking
- Web inference server
- Docker deployment path
- Vocabulary dataset support
- Resume training checkpoints
Use cases
- Chinese couplet entertainment
- Seq2seq teaching demos
- Poetry generation experiments
- Self-hosted couplet API