Download example_use.py from RSPRIMES1234/LSTM_Melody_Generator_for_Music_Composition: direct link, hf CLI and curl.
- Browser
- Download file 215 Bytes
-
https://huggingface.co/RSPRIMES1234/LSTM_Melody_Generator_for_Music_Composition/resolve/main/example_use.py
- Command line
-
hf download hf://RSPRIMES1234/LSTM_Melody_Generator_for_Music_Composition/example_use.py
-
curl -L -o example_use.py https://huggingface.co/RSPRIMES1234/LSTM_Melody_Generator_for_Music_Composition/resolve/main/example_use.py
215 Bytes
| from model import load_model | |
| melody_generator = load_model("path/to/model.h5", "path/to/mapping.json") | |
| seed = "60 _ 60 _ 67 _ 67 _ 69 _ 69 _ 67 _ _" | |
| melody = melody_generator.generate_melody(seed, 500, 64, 0.3) |