https://github.com/alexandrelam/spotifyml
Neural Network Classifier guesses Spotify songs genre π§ πΈπ€πΌ
https://github.com/alexandrelam/spotifyml
neural spotify tensorflow
Last synced: about 2 months ago
JSON representation
Neural Network Classifier guesses Spotify songs genre π§ πΈπ€πΌ
- Host: GitHub
- URL: https://github.com/alexandrelam/spotifyml
- Owner: alexandrelam
- License: mit
- Created: 2022-01-20T11:43:08.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-21T10:17:14.000Z (over 4 years ago)
- Last Synced: 2025-02-26T11:35:21.070Z (over 1 year ago)
- Topics: neural, spotify, tensorflow
- Language: Python
- Homepage:
- Size: 11.3 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
Neural Network for Spotify genre
(97% accuracy)
I built a neural network that guesses the genre of a music based on data
scrapped on Spotify!
Report Bug
Β·
Request Feature

### Built With
- [Tensorflow](https://www.tensorflow.org/?hl=fr)
- [Keras](https://keras.io/)
- [Scikit-learn](https://scikit-learn.org/stable/)
- [Pandas](https://pandas.pydata.org/docs/index.html)
- [Numpy](https://numpy.org/)
## Results

```
prediction: punk | real result: punk
prediction: country | real result: country
good/total: 28/30 - 93%
```
### Getting Started
#### Train the neural network
1. Install dependancies
```
pip install -r requirements.txt
```
2. Run
```
python train.py
```
3. Open the dashboard
```
tensorboard --logdir=logs
```
#### Run the test
1. Install dependancies
```
pip install -r requirements.txt
```
2. Change `NUMBER_VALUES` in `test.py`
3. Run!
```
python test.py
```
### Media



```
prediction: pop | real result: pop
prediction: rock | real result: rock
prediction: pop | real result: pop
prediction: edm | real result: edm
prediction: jazz | real result: jazz
prediction: electro | real result: electro
prediction: pop | real result: pop
prediction: rock | real result: rock
prediction: salsa | real result: salsa
prediction: chanson | real result: chanson
prediction: chanson | real result: hip hop
prediction: rock | real result: rock
prediction: hip hop | real result: hip hop
prediction: dance | real result: dance
prediction: pop | real result: pop
prediction: hip hop | real result: soul
prediction: jazz | real result: jazz
prediction: pop | real result: pop
prediction: hip hop | real result: hip hop
prediction: hip hop | real result: hip hop
prediction: pop | real result: pop
prediction: edm | real result: edm
prediction: dance | real result: dance
prediction: rock | real result: rock
prediction: disco | real result: disco
prediction: rock | real result: rock
prediction: country | real result: country
prediction: blues | real result: blues
prediction: punk | real result: punk
prediction: country | real result: country
good/total: 28/30 - 93%
```
### Roadmap
- [x] with a long training acc should be ok, but test dataset has low acc. maybe it's overtraining...
### Things to try
- [x] change the model (layers, categorical to binary?)
- [x] drop some col on the dataset that are useless
- [x] check normalization
[contributors-shield]: https://img.shields.io/github/contributors/alexandrelam/spotifyml.svg?style=for-the-badge
[contributors-url]: https://github.com/alexandrelam/spotifyml/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/alexandrelam/spotifyml.svg?style=for-the-badge
[forks-url]: https://github.com/alexandrelam/spotifyml/network/members
[stars-shield]: https://img.shields.io/github/stars/alexandrelam/spotifyml.svg?style=for-the-badge
[stars-url]: https://github.com/alexandrelam/spotifyml/stargazers
[issues-shield]: https://img.shields.io/github/issues/alexandrelam/spotifyml.svg?style=for-the-badge
[issues-url]: https://github.com/alexandrelam/spotifyml/issues
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=for-the-badge
[license-url]: https://github.com/alexandrelam/spotifyml/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[product-screenshot]: images/screenshot.png