--- 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