File size: 910 Bytes
5b3c689
0d94bde
 
 
 
5b3c689
 
 
0d94bde
5b3c689
 
0d94bde
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: ML Music Classifier API
emoji: 🎵
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
license: mit
app_port: 7860
---

# ML Music Classifier API

This API predicts whether a song will be "liked" or "not liked" based on audio features using 8 different machine learning models.

## Models Available
- ANN (Artificial Neural Network)
- KNN (K-Nearest Neighbors)
- Logistic Regression
- Neural Network
- Naive Bayes
- Random Forest
- SVM (Support Vector Machine)
- XGBoost

## API Endpoints
- POST /predict/{model_name} - Make predictions with specific model
- GET /docs - API documentation

## Authentication
All endpoints require an API token in the X-Token header.

## Usage
```bash
curl -X POST "https://your-space-name.hf.space/predict/random_forest_model" \
     -H "X-Token: your-token-here" \
     -H "Content-Type: application/json" \
     -d '{"danceability": 0.8, "energy": 0.7, ...}'