Skip to content

OpenGenus/Genre-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Genre-Classification

Genre Prediction using Lyrics

Overview

This notebook demonstrates a machine learning model for predicting the genre of songs based on their lyrics. The model is trained on a dataset containing lyrics from various genres such as Pop, Rock, Hip-Hop, etc.

Prerequisites

To run this notebook, you need:

  • Python installed on your system
  • Jupyter Notebook or Google Colab for running the notebook
  • Required Python libraries: pandas, scikit-learn, joblib

Steps to Run the Notebook

1. Clone the Repository

Clone this GitHub repository to your local machine:

git clone https://github.com/your_username/your_repository.git

2. Navigate to the Notebook

Navigate to the directory where you cloned the repository:

cd path/to/your_repository

3. Open the Notebook

Open the Genre_Prediction.ipynb notebook using Jupyter Notebook or Google Colab.

4. Execute the Notebook Cells

Execute each cell in the notebook sequentially. Make sure to follow any instructions provided in the comments within the code cells.

5. Provide Necessary Inputs

If required, provide necessary inputs such as uploading the Kaggle API token (kaggle.json) and any other data files needed for training the model.

6. Run the Model

Run the cells responsible for training the machine learning model and evaluating its accuracy.

7. Predict Genres

After training the model, you can use the provided functions to predict genres for given song lyrics. Example usage is provided in the notebook.

8. Save Model (Optional)

If you wish to save the trained model for future use, follow the instructions provided in the notebook to save the model to a file.

9. Clean Lyrics (Optional)

There is a function provided for cleaning song lyrics before prediction. You can use this function to preprocess your lyrics data if needed.

About

Genre Classification Through Song Lyrics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published