marshal-yash commited on
Commit
61f8b55
Β·
verified Β·
1 Parent(s): 6317c91

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -7
README.md CHANGED
@@ -1,11 +1,56 @@
1
  ---
2
- title: SER Wav2vec
3
- emoji: πŸ“‰
4
- colorFrom: gray
5
- colorTo: red
6
  sdk: docker
7
- pinned: false
8
- license: mit
9
  ---
10
 
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: SER Wav2Vec
 
 
 
3
  sdk: docker
4
+ app_port: 7860
 
5
  ---
6
 
7
+ # 🎀 Speech Emotion Recognition β€” Wav2Vec2 (FastAPI + Docker)
8
+
9
+ This Hugging Face Space provides a backend API for **Speech Emotion Recognition (SER)**
10
+ using the Wav2Vec2ForSequenceClassification model.
11
+
12
+ The backend is implemented using **FastAPI** and runs inside a **Docker** container
13
+ that exposes the `/predict` endpoint to accept audio and return emotion scores.
14
+
15
+ ---
16
+
17
+ ## πŸš€ API Endpoints
18
+
19
+ ### **1. Health Check**
20
+
21
+ ##/GET
22
+
23
+ Example Response:
24
+ ```json
25
+ { "status": "ok" }
26
+
27
+ Emotion Prediction
28
+ POST /predict
29
+ | field | type | description |
30
+ | ----- | ------ | ------------------------------- |
31
+ | file | binary | audio file (.wav / .mp3 / .m4a) |
32
+
33
+
34
+ curl -X POST "https://marshal-yash-SER_wav2vec.hf.space/predict" \
35
+ -H "accept: application/json" \
36
+ -H "Content-Type: multipart/form-data" \
37
38
+
39
+
40
+ {
41
+ "results": [
42
+ { "label": "happy", "score": 0.71 },
43
+ { "label": "neutral", "score": 0.15 },
44
+ { "label": "sad", "score": 0.08 }
45
+ ],
46
+ "dominant": { "label": "happy", "score": 0.71 }
47
+ }
48
+
49
+
50
+ β”œβ”€β”€ server.py # FastAPI application
51
+ β”œβ”€β”€ Dockerfile # Docker config for HF Spaces
52
+ β”œβ”€β”€ requirements.txt # Python dependencies
53
+ └── README.md # Documentation (this file)
54
+
55
+
56
+ marshal-yash/SER_wav2vec