Spaces:
Running
title: Fyp Start Space
emoji: π
colorFrom: purple
colorTo: green
sdk: gradio
sdk_version: 5.5.0
app_file: app.py
pinned: false
license: mit
short_description: create this first space for getting familiar with space
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Music Genre Classifier + Lyric Stylist π΅
A powerful web application that combines music genre classification with AI-powered lyric generation. This tool can analyze both audio files and text lyrics to determine the genre, then generate new lyrics in that style or transform existing lyrics into different genres.
Features
- Dual Input Support:
- Audio file analysis for genre detection
- Text-based lyrics analysis
- Genre Classification:
- Accurate genre detection using state-of-the-art models
- Supports multiple popular music genres
- Lyric Generation:
- Genre-aware lyric generation
- Theme-based content creation
- Multiple generation options (temperature, length, versions)
- Style Transfer:
- Transform existing lyrics into different genres
- Preserve core message while adapting style
Installation
- Clone the repository:
git clone [your-repo-url]
cd music-genre-classifier-lyric-stylist
- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
Usage
- Start the application:
python app.py
Open your web browser and navigate to the provided URL (typically http://localhost:7860)
Choose your input method:
- Upload an audio file
- Enter lyrics text
Adjust generation parameters:
- Temperature (controls randomness)
- Maximum length
- Number of versions
Click "Detect Genre & Generate Lyrics" or use the "Style Transfer" tab for existing lyrics
Models Used
- Genre Classification:
- Audio:
anton-l/wav2vec2-base-superb-gc
- Text:
facebook/bart-large-mnli
(Zero-shot classification)
- Audio:
- Lyric Generation:
gpt2-medium
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Hugging Face for providing the pre-trained models
- Gradio for the web interface framework
- The open-source community for various audio processing libraries