Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
---
|
| 3 |
+
language: en
|
| 4 |
+
tags:
|
| 5 |
+
- text-classification
|
| 6 |
+
- emotion-recognition
|
| 7 |
+
pipeline_tag: text-classification
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Emotion Classifier (MELD)
|
| 11 |
+
|
| 12 |
+
This model classifies text input into emotional categories, trained on MELD.
|
| 13 |
+
|
| 14 |
+
## API Usage
|
| 15 |
+
|
| 16 |
+
```python
|
| 17 |
+
import requests
|
| 18 |
+
|
| 19 |
+
API_URL = "https://api-inference.huggingface.co/models/Nn-n/emotion-classifier-meld"
|
| 20 |
+
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
|
| 21 |
+
|
| 22 |
+
def query(payload):
|
| 23 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
| 24 |
+
return response.json()
|
| 25 |
+
|
| 26 |
+
output = query({"inputs": "I'm feeling excited!"})
|
| 27 |
+
print(output)
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
## Unreal Engine Usage
|
| 31 |
+
|
| 32 |
+
1. Use HTTP Request Plugin or Blueprint to POST to the API URL.
|
| 33 |
+
2. Include a header with Bearer token authorization.
|
| 34 |
+
3. Send a JSON object like: `{"inputs": "Your text here"}`
|
| 35 |
+
4. Parse the returned label and score.
|