gpt-2 raps
A neural rap lyrics generator powered by GPT-2, ported from gpt-2-poetry by @kcimc.
Example
Demo running here.
Setup
- R, geniusr for sourcing original lyrics from Genius
- Python, GPT-2 for generating lyrics (follow these installation instructions for GPT-2)
Contents
Input:
- Genius song IDs stored in
genius_song_ids.txt
src:
00_requirements.Rinstalls/loads required R libraries01_get-raps.Rgets lyrics from Genius for tracks ingenius_song_ids.txt, then exports to text files02_gen-raps.ipynbmakes new lyrics based on random chunks from existing lyrics and seed words (should be run from yourgpt-2/src/directory)
Output:
[0-9].txtlyrics as text files (generated by01_get-raps.R)lyrics.jsonall original lyrics as JSONgenerated.jsonall generated lyrics as JSON
index.html houses the demo app.
On this page
Languages
Jupyter Notebook74.3%HTML21.2%R4.5%
MIT License
Created March 9, 2019
Updated July 5, 2025