root
commited on
Commit
·
0750c9c
1
Parent(s):
bea11aa
ss
Browse files
README.md
CHANGED
@@ -17,7 +17,7 @@ This Hugging Face Space application provides two AI-powered features:
|
|
17 |
|
18 |
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.
|
19 |
|
20 |
-
2. **Lyrics Generation**: Based on the detected genre, the app generates original lyrics using [
|
21 |
|
22 |
## Features
|
23 |
|
@@ -44,4 +44,4 @@ This Hugging Face Space application provides two AI-powered features:
|
|
44 |
## Links
|
45 |
|
46 |
- [Music Genre Classification Model](https://huggingface.co/dima806/music_genres_classification)
|
47 |
-
- [
|
|
|
17 |
|
18 |
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.
|
19 |
|
20 |
+
2. **Lyrics Generation**: Based on the detected genre, the app generates original lyrics using [Qwen/QwQ-32B](https://huggingface.co/Qwen/QwQ-32B) that match both the style of the genre and approximate length of the song.
|
21 |
|
22 |
## Features
|
23 |
|
|
|
44 |
## Links
|
45 |
|
46 |
- [Music Genre Classification Model](https://huggingface.co/dima806/music_genres_classification)
|
47 |
+
- [Qwen QwQ-32B Model](https://huggingface.co/Qwen/QwQ-32B)
|
app.py
CHANGED
@@ -36,7 +36,7 @@ if "HF_TOKEN" in os.environ:
|
|
36 |
# Constants
|
37 |
GENRE_MODEL_NAME = "dima806/music_genres_classification"
|
38 |
MUSIC_DETECTION_MODEL = "MIT/ast-finetuned-audioset-10-10-0.4593"
|
39 |
-
LLM_MODEL_NAME = "Qwen/
|
40 |
SAMPLE_RATE = 22050 # Standard sample rate for audio processing
|
41 |
|
42 |
# Check CUDA availability (for informational purposes)
|
@@ -59,7 +59,7 @@ except Exception as e:
|
|
59 |
genre_feature_extractor = None
|
60 |
|
61 |
# Load LLM and tokenizer at initialization time
|
62 |
-
print("Loading Qwen
|
63 |
try:
|
64 |
# Configure 4-bit quantization for better performance
|
65 |
quantization_config = BitsAndBytesConfig(
|
|
|
36 |
# Constants
|
37 |
GENRE_MODEL_NAME = "dima806/music_genres_classification"
|
38 |
MUSIC_DETECTION_MODEL = "MIT/ast-finetuned-audioset-10-10-0.4593"
|
39 |
+
LLM_MODEL_NAME = "Qwen/QwQ-32B"
|
40 |
SAMPLE_RATE = 22050 # Standard sample rate for audio processing
|
41 |
|
42 |
# Check CUDA availability (for informational purposes)
|
|
|
59 |
genre_feature_extractor = None
|
60 |
|
61 |
# Load LLM and tokenizer at initialization time
|
62 |
+
print("Loading Qwen QwQ-32B model with 4-bit quantization...")
|
63 |
try:
|
64 |
# Configure 4-bit quantization for better performance
|
65 |
quantization_config = BitsAndBytesConfig(
|