A text generator trained over Baudelaire's poems.
Simply run:
pip3 install baudelaire
baudelaire --help
baudelaire train --epochs 100 --batch_size 50 -o weights.h5
baudelaire write --sequences 10 -o poem.txt -i weights.h5
Create a virtualenv:
python3 -m venv venv
Activate it:
. venv/bin/activate
And install the required packages:
pip3 install -r requirements.txt
I fetched Baudelaire's poems from this website using scrapy.
Run
scrapy runspider scraping/poems.py -t json -o poems.json
to save the poems contents and a few metadata in a poems.json
file.
You can find some metadata about the poems and the collections they are categorized in, in data/stats.json
.
This json was generated with the scraping/analyzer.py
script.