Audio Classification
Transformers
Safetensors
English
audio-spectrogram-transformer
audio
ast
music
mood
Instructions to use guyPerry/audio-mood-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use guyPerry/audio-mood-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("audio-classification", model="guyPerry/audio-mood-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoFeatureExtractor, AutoModelForAudioClassification extractor = AutoFeatureExtractor.from_pretrained("guyPerry/audio-mood-classifier") model = AutoModelForAudioClassification.from_pretrained("guyPerry/audio-mood-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add model card with pipeline_tag to enable serverless inference
Browse files
README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: audio-classification
|
| 3 |
+
library_name: transformers
|
| 4 |
+
language: en
|
| 5 |
+
tags:
|
| 6 |
+
- audio
|
| 7 |
+
- audio-classification
|
| 8 |
+
- ast
|
| 9 |
+
- music
|
| 10 |
+
- mood
|
| 11 |
+
license: apache-2.0
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Audio Mood Classifier
|
| 15 |
+
|
| 16 |
+
Fine-tuned [Audio Spectrogram Transformer (AST)](https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593) for music mood classification.
|
| 17 |
+
|
| 18 |
+
## Classes
|
| 19 |
+
|
| 20 |
+
| Label | Description |
|
| 21 |
+
|---|---|
|
| 22 |
+
| calm_melancholic | Slow, introspective, melancholic |
|
| 23 |
+
| moderate_neutral | Balanced, mid-energy, neutral feel |
|
| 24 |
+
| energetic_upbeat | Fast, high-energy, upbeat |
|
| 25 |
+
|
| 26 |
+
## Usage
|
| 27 |
+
|
| 28 |
+
```python
|
| 29 |
+
from transformers import pipeline
|
| 30 |
+
classifier = pipeline("audio-classification", model="guyPerry/audio-mood-classifier")
|
| 31 |
+
result = classifier("song.mp3")
|
| 32 |
+
```
|