multilingual-emotion-classifier / GRADIO_APP_README.md
rmtariq's picture
🎭 Add Gradio app documentation
a443fa3 verified
# 🎭 Interactive Emotion Classifier - Gradio App
This is an interactive web application for testing the `rmtariq/multilingual-emotion-classifier` model directly on Hugging Face Spaces.
## πŸš€ Features
### 🎯 **Single Text Analysis**
- Analyze individual texts for emotion classification
- Real-time confidence scoring
- Visual confidence charts and gauges
- Support for English and Malay languages
### πŸ“Š **Batch Analysis**
- Process multiple texts simultaneously
- Emotion distribution visualization
- Detailed results table
- Summary statistics
### πŸ§ͺ **Model Testing**
- Run predefined test cases
- Validate model performance
- Check accuracy across languages
- Verify fixed issues
### ℹ️ **Model Information**
- Complete model documentation
- Performance metrics
- Supported emotions and languages
- Use cases and examples
## 🎯 Supported Emotions
| Emotion | Emoji | Description |
|---------|-------|-------------|
| **Anger** | 😠 | Frustration, irritation, rage |
| **Fear** | 😨 | Anxiety, worry, terror |
| **Happy** | 😊 | Joy, excitement, contentment |
| **Love** | ❀️ | Affection, care, romance |
| **Sadness** | 😒 | Sorrow, disappointment, grief |
| **Surprise** | 😲 | Amazement, shock, wonder |
## 🌍 Languages Supported
- πŸ‡¬πŸ‡§ **English**: Full support with 100% accuracy
- πŸ‡²πŸ‡Ύ **Malay**: Comprehensive support with all issues fixed
## πŸ“Š Model Performance
- **Overall Accuracy**: 85.0%
- **F1 Macro Score**: 85.5%
- **English Performance**: 100%
- **Malay Performance**: 100% (fixed)
- **Speed**: 20+ predictions/second
## πŸ§ͺ Example Usage
### English Examples:
```
"I am so happy today!" β†’ 😊 Happy (99.9%)
"This makes me really angry!" β†’ 😠 Anger (96.3%)
"I love you so much!" β†’ ❀️ Love (99.3%)
"I'm scared of spiders" β†’ 😨 Fear (99.8%)
"This news makes me sad" β†’ 😒 Sadness (99.8%)
"What a surprise!" β†’ 😲 Surprise (99.7%)
```
### Malay Examples:
```
"Saya sangat gembira!" β†’ 😊 Happy (99.9%)
"Aku marah dengan keadaan ini" β†’ 😠 Anger (91.3%)
"Aku sayang kamu" β†’ ❀️ Love (99.6%)
"Saya takut dengan ini" β†’ 😨 Fear (99.8%)
"Ini adalah hari jadi terbaik!" β†’ 😊 Happy (99.9%) βœ… Fixed!
"Terbaik!" β†’ 😊 Happy (99.9%) βœ… Fixed!
```
## πŸ”§ Recent Fixes (Version 2.1)
- βœ… **Birthday contexts**: "Hari jadi terbaik" now correctly β†’ happy
- βœ… **"Terbaik" expressions**: All "terbaik" contexts now β†’ happy
- βœ… **"Baik" contexts**: Positive "baik" expressions now β†’ happy
- βœ… **Enhanced confidence**: Improved prediction reliability
## 🏭 Use Cases
### **Social Media Monitoring**
- Real-time emotion analysis of posts and comments
- Brand sentiment tracking across languages
- Community mood assessment
### **Customer Service**
- Automated emotion detection in support tickets
- Priority routing based on emotional urgency
- Customer satisfaction analysis
### **Content Analysis**
- Emotional content understanding
- Cross-cultural sentiment analysis
- Research applications
## πŸš€ How to Use This App
1. **Choose a Tab**: Select from Single Text, Batch Analysis, or Model Testing
2. **Enter Text**: Type or paste your text in English or Malay
3. **Analyze**: Click the analyze button to get results
4. **View Results**: See emotion predictions, confidence scores, and visualizations
## πŸ“ž Contact & Resources
- **Author**: rmtariq
- **Model Repository**: [rmtariq/multilingual-emotion-classifier](https://huggingface.co/rmtariq/multilingual-emotion-classifier)
- **License**: Apache 2.0
## 🎯 Technical Details
- **Base Model**: XLM-RoBERTa
- **Training**: Custom multilingual emotion dataset
- **Optimization**: Systematic performance improvement (17.5% β†’ 85%)
- **Testing**: Comprehensive validation suite included
---
**🎭 Try the interactive app above to experience the power of multilingual emotion classification!**