Spaces:
Sleeping
A newer version of the Gradio SDK is available:
5.42.0
title: MoodLens
emoji: π
colorFrom: purple
colorTo: pink
sdk: gradio
sdk_version: 4.19.2
app_file: app.py
pinned: false
license: mit
π MoodLens - Advanced AI for Text & Emotion Analysis
π Overview
MoodLens is a state-of-the-art multi-task deep learning model that analyzes text to understand human emotions, life events, and linguistic nuances. Built with advanced transformer architecture, it provides comprehensive insights into the emotional and contextual layers of any text.
β¨ Features
π― Core Capabilities
- Multi-Event Detection: Identifies 50+ different life events (promotions, relationships, health, career changes)
- Emotion Recognition: Detects 12+ emotional states with high accuracy
- Sentiment Analysis: Continuous sentiment scoring from negative (0) to positive (1)
- Sarcasm Detection: Advanced detection of sarcastic and ironic statements
- Temporal Analysis: Understands past, present, and future references
- Certainty Assessment: Measures the confidence level in statements
π Technical Highlights
- Model: Microsoft DeBERTa-v3-base (400M parameters)
- Architecture: Multi-task learning with 7 simultaneous outputs
- Accuracy: 85%+ on primary event classification
- Inference Time: <1 second per text
- Max Input: 256 tokens
π Try It Out
Simply enter any text in the input box and click "Analyze Text" to get comprehensive insights about:
- The primary life event being described
- Emotional state and sentiment
- Whether sarcasm is present
- Time references and certainty levels
π Example Inputs
Try these examples to see MoodLens in action:
- Career Success: "I just got promoted to senior manager! All the hard work finally paid off."
- Life Changes: "Starting my own business next month. Nervous but excited!"
- Sarcasm Detection: "Oh great, another reorganization. Just what we needed..."
- Emotional Events: "We're getting married next June! Can't wait to start this new chapter."
ποΈ Architecture
MoodLens uses a sophisticated multi-task learning approach:
Input Text β DeBERTa-v3 β Multi-Head Attention β Task-Specific Heads β 7 Outputs
β
Shared Feature Extraction
β
βββββββββββββ΄ββββββββββββ
β β
Event Classification Emotion Analysis
Sentiment Scoring Sarcasm Detection
βββββββββββββ¬ββββββββββββ
β
Unified Analysis
π± Mobile & Desktop Optimized
MoodLens features a fully responsive design that works seamlessly on:
- π± Mobile phones (iOS & Android)
- π» Tablets and laptops
- π₯οΈ Desktop computers
π οΈ Technical Stack
- Framework: PyTorch 2.0+
- Base Model: Microsoft DeBERTa-v3-base
- UI Framework: Gradio 4.19
- Deployment: Hugging Face Spaces
- Processing: CPU-optimized for accessibility
π Performance Metrics
Task | Accuracy/Score |
---|---|
Event Classification | 85.3% |
Emotion Detection | 82.7% |
Sarcasm Detection | 89.1% |
Sentiment MSE | 0.042 |
Event Group Classification | 88.5% |
π€ Use Cases
- Mental Health: Analyze journal entries or social media posts
- Customer Service: Understand customer emotions and concerns
- HR & Recruitment: Analyze employee feedback and reviews
- Content Creation: Ensure appropriate emotional tone
- Personal Development: Track emotional patterns over time
π¨βπ» Creator
Kishan Prajapati
- π GitHub
- πΌ LinkedIn
- π§ Contact: kishanprajapati@email.com
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Microsoft Research for DeBERTa-v3
- Hugging Face for the amazing platform
- The open-source ML community
Made with β€οΈ by Kishan Prajapati
If you find MoodLens helpful, please consider giving it a β!