File size: 1,855 Bytes
a51853d 9e21eef a51853d 9e21eef a51853d 9e21eef |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
---
title: Music Genre Classifier & Lyrics Generator
emoji: 🎵
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 5.22.0
app_file: app.py
pinned: false
license: mit
short_description: AI music genre detection and lyrics generation
---
# Music Genre Classifier & Lyrics Generator
This Hugging Face Space application provides two AI-powered features:
1. **Music Genre Classification**: Upload a music file and get an analysis of its genre using the [dima806/music_genres_classification](https://huggingface.co/dima806/music_genres_classification) model.
2. **Lyrics Generation**: Based on the detected genre, the app generates original lyrics using [Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct) that match both the style of the genre and approximate length of the song.
## Features
- Upload any music file for instant genre classification
- Receive genre predictions with confidence scores
- Get AI-generated lyrics tailored to the detected music genre
- Lyrics length is automatically adjusted based on the song duration
- Simple and intuitive user interface
## Usage
1. Visit the live application on Hugging Face Spaces
2. Upload your music file using the provided interface
3. Click "Analyze & Generate" to process the audio
4. View the detected genre and generated lyrics in the output panels
## Technical Details
- Uses MFCC features extraction from audio for genre classification
- Leverages 4-bit quantization for efficient LLM inference on T4 GPU
- Implements a specialized prompt engineering approach to generate genre-specific lyrics
- Automatically scales lyrics length based on audio duration
## Links
- [Music Genre Classification Model](https://huggingface.co/dima806/music_genres_classification)
- [Llama 3.1 8B Instruct Model](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct)
|