Spaces:
Sleeping
Sleeping
File size: 2,630 Bytes
987d79c 5ac332c 987d79c 5ac332c 987d79c 5ac332c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
---
title: How Am I Feeling? - Emotion Classifier
emoji: π
colorFrom: purple
colorTo: blue
sdk: docker
pinned: false
license: mit
---
# π How Am I Feeling? - AI Emotion Classifier
An AI-powered emotion detection system that analyzes text and identifies 10 different emotions with 88.6% accuracy.
## π Features
- **10 Emotion Classes**: happiness, sadness, fear, embarrassment, disgust, drive, surprise, loneliness, love, excitement
- **Beautiful Web UI**: Modern, responsive interface with real-time analysis
- **High Accuracy**: 88.6% validation accuracy
- **Fast Inference**: <10ms per sentence
- **Word2Vec + Neural Network**: 300-dim embeddings β 128β64β10 network
## π Try It Out
Simply type or paste any text to see what emotions it conveys!
**Example sentences:**
- "I'm so grateful for this beautiful day!" β happiness
- "I miss the way things used to be" β sadness
- "I can't wait for the concert tomorrow!" β excitement
- "Every moment with you makes my heart complete" β love
- "I'm terrified of what might happen next" β fear
## π§ Technical Details
### Architecture
```
Input Text β Preprocessing β Word2Vec (300-dim) β Neural Network (128β64β10) β Top-5 Predictions
```
### Dataset
- **Size**: 100,000 sentences (10,000 per emotion)
- **Source**: Generated using LLaMA 3.1 70B via Deepinfra
- **Quality**: Diverse, natural language examples
### Model
- **Embeddings**: Word2Vec (Skip-gram, 300 dimensions)
- **Classifier**: Fully-connected neural network
- **Parameters**: 34,634 trainable parameters
- **Training**: 50 epochs with early stopping
- **Validation Accuracy**: 88.6%
## π Performance
Per-emotion accuracy:
- Best: happiness, love, excitement (~92%)
- Good: sadness, fear, surprise (~88%)
- Moderate: embarrassment, drive, disgust (~84%)
## π» API Usage
```bash
curl -X POST http://your-space-url/analyze \
-H "Content-Type: application/json" \
-d '{"text": "I am so excited about this!"}'
```
Response:
```json
{
"success": true,
"predictions": [
{"emotion": "excitement", "confidence": 0.92, "percentage": 92.0},
{"emotion": "happiness", "confidence": 0.85, "percentage": 85.0},
...
]
}
```
## π οΈ Built With
- **TensorFlow/Keras** - Deep learning
- **Gensim** - Word2Vec embeddings
- **Flask** - Web framework
- **NLTK** - Text processing
## π License
MIT License - Free to use for personal or commercial projects!
## π Links
- **GitHub**: [emotion-classifier](https://github.com/yourusername/emotion-classifier)
- **Dataset**: Coming soon to Hugging Face Datasets
---
Built with β€οΈ and Python
|