INNER CODE UNIT · Python
play_generated_song
MITDeepLearning/introtodeeplearning · mitdeeplearning/lab1.py:54
def play_generated_song(generated_text):
songs = extract_song_snippet(generated_text)
if len(songs) == 0:
print(
"No valid songs found in generated text. Try training the \
model longer or increasing the amount of generated music to \
ensure complete songs are generated!"
)
for song in songs:
play_song(song)
print(
"None of the songs were valid, try training longer to improve \
syntax."
)
def test_batch_func_types(func, args):