Space4 / README.md
Raemih's picture
Update README.md
9d3f6cb verified
---
title: E-motionAssistant API
emoji: 🌍
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
pinned: false
---
# Multilingual Text Emotion Recognition App
**English • සිංහල • தமிழ்**
This is a simple web app that detects emotions from text in three languages:
- **English** → Logistic Regression + TF-IDF (classical ML model)
- **Sinhala** → Finetuned transformer model
- **Tamil** → Finetuned transformer model
### Supported Languages & Models
| Language | Model Type | Repository on Hugging Face |
|------------|-------------------------|------------------------------------------------------------------|
| English | TF-IDF + Logistic Regression | E-motionAssistant/Englsih_Trained_Model_LR |
| Sinhala | Finetuned Transformer | E-motionAssistant/SInhala_Text_Emotion_Recognition_Model |
| Tamil | Finetuned Transformer | E-motionAssistant/Tamil_Emotion_Recognition_Model |
### How to Use
1. Go to one of the tabs (English / සිංහල / தமிழ்)
2. Type or paste your text/message/tweet
3. The app will show the predicted emotion + confidence score
### Examples
- English: "I hate mondays so much" → likely **sadness** or **anger**
- Sinhala: "මම ගොඩක් දුකින් ඉන්නවා" → likely **sadness**
- Tamil: "எனக்கு ரொம்ப கோபமா இருக்கு" → likely **anger**
### Technical Notes
- Built with **Gradio** (v4.44.0)
- Models are downloaded from Hugging Face at startup (using `hf_hub_download` and `pipeline`)
- Uses **Python 3.11** to avoid compatibility issues
- No GPU required — runs on CPU
### Want to run locally?
```bash
git clone https://huggingface.co/spaces/YOUR_USERNAME/Space4
cd Space4
pip install -r requirements.txt
python app.py