Generate chords to a given lyrics using LSTM
You can access our official user friendly website https://gefenk9.github.io/lyrics-to-chords-generator/
You should allow mix content via your browser, because the website is served with HTTPS and the server answers with HTTP.
Run model_LSTM to train the model with the current hyperparamters.
If you wish to edit the hyperparameters you can do it by editing the variables in the code under the comment #Hyperparameters
.
There are a lot of different versions of the model under the model_versions
directory.
# For loading existing model
model = torch.load(file)
# For saving your own type of model you shoould run :
torch.save(model, './../model_versions/model_details_'+time.strftime("%Y%m%d_%H%M%S"))
Dependencies:
pip3 install torch torchvision matplotlib
The to bind tn port 8080:
python3 server.py 8080
curl http://localhost:8080/to_chords -d '{"lyrics":"i love you\nlife is even better with you"}' -i
HTTP/1.0 200 OK
Server: BaseHTTP/0.6 Python/3.6.7
Date: Thu, 25 Apr 2019 12:19:32 GMT
{"chords": [["C","C","G"],["C","C","G","G","G","G"]]}
Each inner array coresponds to a lyrics line. Each chord in an inner array coresponds to a word in the line.