Spaces:
Sleeping
Sleeping
| 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 | |