tflyrics
Generate intriguing lyrics with TensorFlow and an internet connection.
tflyrics is a Python package that allows you to easily select lyrics of
specific artists from genius.com, and train a deep
neural network to generate text that sounds similar to those lyrics. This
work was inspired from The Unreasonable Effectiveness of Recurrent Neural
Networks and
Text generation with an
RNN.
Example:
from tflyrics import Poet, LyricsGenerator
artists = ['Bob Dylan', 'Tim Buckley', 'The Beatles']
gen = LyricsGenerator(artists, per_artist=5)
ds = gen.as_dataset(batch_size=16)
p = Poet()
p.train_on(ds, n_epochs=10)
poem = p.generate(start_string='Hey ', n_gen_chars=1000)
print(poem)
Quick paraphrase: a LyricsGenerator object makes it easy for you to create a
data pipeline that feeds from the Genius API directly into a recurrent neural
network; a Poet object is a wrapper around a recurrent neural network.
Note that the Genius API requires you to have an access token. Without
that, tflyrics won't be able to get lyrics for you. You can get an access
token for free at docs.genius.com. Once you have
it you can either pass it under the token argument of a LyricsGenerator
constructor, or store it as en environment variable (with export GENIUS_ACCESS_TOKEN='<your token here>'). tflyrics will detect this
environment variable automatically, if it exists.
Release files for tflyrics 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tflyrics-0.2.1.tar.gz | 10.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tflyrics-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.4 kB
Release files / tflyrics-0.2.1.tar.gz
| Download URL | tflyrics-0.2.1.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0224133fb80ef1d1c5c25eee0085b7efbf6288dd10b546a9ec607597d48f1dff
|
|
BLAKE2b-256 checksum How to use checksums |
04f2c1d00054462c2b01fc585ebd93edc10ad3d16babf9174a2972b7b72824da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|
Release files / tflyrics-0.2.1-py3-none-any.whl
| Download URL | tflyrics-0.2.1-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15e381e84dd55c9c2955b37a9b617d9f058a7093dad423405b00050f96766cee
|
|
BLAKE2b-256 checksum How to use checksums |
9058befd06829a3c392e7195094ca7e8df07b775ba82589adca5bf7c06c63601
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|