explaingit

lucasjinreal/tensorflow_poems

Analysis updated 2026-05-18

3,638PythonAudience · researcherComplexity · 3/5LicenseSetup · moderate

TLDR

A neural network project that trains on classical Chinese poems and generates new poetry, including acrostic poems, in a similar style.

Mindmap

mindmap
  root((repo))
    What it does
      Generates poems
      Acrostic support
    Tech stack
      Python
      TensorFlow
      LSTM
    Use cases
      Poem generation
      AI lyrics
    Audience
      Researchers
      Hobbyists

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Train a model on a collection of classical Chinese poems to generate new ones.

USE CASE 2

Generate an acrostic poem where the first character of each line spells a chosen word.

USE CASE 3

Study how an LSTM model can be trained to generate structured text sequences.

What is it built with?

PythonTensorFlowLSTM

How does it compare?

lucasjinreal/tensorflow_poemsbyt3bl33d3r/mitmfgaubert/gmvault
Stars3,6383,6393,639
LanguagePythonPythonPython
Setup difficultymoderatehardeasy
Complexity3/54/52/5
Audienceresearcherops devopsgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires TensorFlow 1.10 and training time before generation produces good results.

Free to use, modify, and distribute, even commercially, as long as you include the original copyright and license notice.

In plain English

LiBai AI Composer is a Python project that trains a neural network to write classical Chinese poetry. Named after the Tang dynasty poet Li Bai, the model learns from a corpus of ancient Chinese poems and then generates new ones in a similar style. The README shows example output, a seven-line verse the model produced after training on roughly 40,000 Tang poems. The project uses TensorFlow and an LSTM (a type of recurrent neural network well suited for generating sequences of text). Training runs by executing a single Python script, and the model comes with preprocessed data included, so new users do not need to collect or format the source poems themselves. A separate script handles poem generation after training is complete. Aside from classical poetry, the project was extended to also imitate the lyrics of a popular Chinese pop musician. The README notes that this feature needs more training data to produce convincing results and invites contributors to submit song lyric text files. The repository also includes acrostic poem support, where the first character of each line spells out a word of your choosing. Users pass a starting character or word and the model constructs a poem around it. The README is written primarily in Chinese. The project is open source under the Apache license. It was built as a learning exercise and has received several updates since 2017 to fix bugs like an infinite loop during generation and to simplify the data preprocessing steps.

Copy-paste prompts

Prompt 1
Walk me through training this model on the included Tang poem dataset.
Prompt 2
Explain how the acrostic poem feature picks the starting character for each line.
Prompt 3
Help me understand how an LSTM generates text one character at a time in this project.

Frequently asked questions

What is tensorflow_poems?

A neural network project that trains on classical Chinese poems and generates new poetry, including acrostic poems, in a similar style.

What language is tensorflow_poems written in?

Mainly Python. The stack also includes Python, TensorFlow, LSTM.

What license does tensorflow_poems use?

Free to use, modify, and distribute, even commercially, as long as you include the original copyright and license notice.

How hard is tensorflow_poems to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is tensorflow_poems for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.