Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
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.
FAQs
Generate lyrics with TensorFlow and the Genius API
We found that tflyrics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.