Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
---
|
| 2 |
-
title: Emotion Recognition (
|
| 3 |
emoji: 😊
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 4.44.0
|
|
@@ -10,5 +10,41 @@ python_version: 3.11
|
|
| 10 |
pinned: false
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Multilingual Emotion Recognition (EN / SI / TA)
|
| 3 |
emoji: 😊
|
| 4 |
+
colorFrom: indigo
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 4.44.0
|
|
|
|
| 10 |
pinned: false
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Multilingual Text Emotion Recognition App
|
| 14 |
+
**English • සිංහල • தமிழ்**
|
| 15 |
+
|
| 16 |
+
This is a simple web app that detects emotions from text in three languages:
|
| 17 |
+
|
| 18 |
+
- **English** → Logistic Regression + TF-IDF (classical ML model)
|
| 19 |
+
- **Sinhala** → Finetuned transformer model
|
| 20 |
+
- **Tamil** → Finetuned transformer model
|
| 21 |
+
|
| 22 |
+
### Supported Languages & Models
|
| 23 |
+
| Language | Model Type | Repository on Hugging Face |
|
| 24 |
+
|------------|-------------------------|------------------------------------------------------------------|
|
| 25 |
+
| English | TF-IDF + Logistic Regression | E-motionAssistant/Englsih_Trained_Model_LR |
|
| 26 |
+
| Sinhala | Finetuned Transformer | E-motionAssistant/SInhala_Text_Emotion_Recognition_Model |
|
| 27 |
+
| Tamil | Finetuned Transformer | E-motionAssistant/Tamil_Emotion_Recognition_Model |
|
| 28 |
+
|
| 29 |
+
### How to Use
|
| 30 |
+
1. Go to one of the tabs (English / සිංහල / தமிழ்)
|
| 31 |
+
2. Type or paste your text/message/tweet
|
| 32 |
+
3. The app will show the predicted emotion + confidence score
|
| 33 |
+
|
| 34 |
+
### Examples
|
| 35 |
+
- English: "I hate mondays so much" → likely **sadness** or **anger**
|
| 36 |
+
- Sinhala: "මම ගොඩක් දුකින් ඉන්නවා" → likely **sadness**
|
| 37 |
+
- Tamil: "எனக்கு ரொம்ப கோபமா இருக்கு" → likely **anger**
|
| 38 |
+
|
| 39 |
+
### Technical Notes
|
| 40 |
+
- Built with **Gradio** (v4.44.0)
|
| 41 |
+
- Models are downloaded from Hugging Face at startup (using `hf_hub_download` and `pipeline`)
|
| 42 |
+
- Uses **Python 3.11** to avoid compatibility issues
|
| 43 |
+
- No GPU required — runs on CPU
|
| 44 |
+
|
| 45 |
+
### Want to run locally?
|
| 46 |
+
```bash
|
| 47 |
+
git clone https://huggingface.co/spaces/YOUR_USERNAME/Space4
|
| 48 |
+
cd Space4
|
| 49 |
+
pip install -r requirements.txt
|
| 50 |
+
python app.py
|