--- language: - en license: apache-2.0 pipeline_tag: text-classification library_name: python tags: - emotion-detection - emotion-analysis - conversation-analysis - affective-computing - explainable-ai task_categories: - text-classification model-index: - name: emotion-shift-detector results: [] --- # Emotion Shift Detector πŸ§ πŸ“ˆ **EmotionShiftDetector** is an AI system that detects **subtle emotional transitions across conversations**, not just isolated sentiment in individual messages. Instead of answering *β€œWhat emotion is this message?”*, it answers: > **β€œHow is the emotion changing over time?”** The model is designed for **conversation analysis, mental-health tools, customer support analytics, and emotion-aware AI agents**. --- ## πŸ” What Problem Does It Solve? Traditional sentiment analysis treats messages independently. EmotionShiftDetector focuses on **emotional dynamics** by identifying: - Emotional escalation or de-escalation - Mood shifts across dialogue turns - Sudden emotional changes that indicate risk, frustration, or recovery --- ## ✨ Key Features - 🧠 Emotion classification per conversation turn - πŸ”„ Detection of emotional shifts over time - πŸ—£οΈ Human-readable explanations for each shift - 🧩 Modular and explainable design - πŸ€— Hugging Face–ready pipeline - πŸŽ›οΈ Gradio demo included - πŸ§ͺ Test-covered core components --- ## πŸ“‚ Project Structure ``` emotion-shift-detector/ β”œβ”€β”€ config/ β”œβ”€β”€ data/ β”œβ”€β”€ src/ β”œβ”€β”€ training/ β”œβ”€β”€ pipelines/ β”œβ”€β”€ scripts/ β”œβ”€β”€ tests/ β”œβ”€β”€ notebooks/ β”œβ”€β”€ app.py β”œβ”€β”€ README.md β”œβ”€β”€ model_card.md β”œβ”€β”€ requirements.txt └── LICENSE ``` --- ## βš™οΈ Installation ```bash pip install -r requirements.txt ``` --- ## πŸš€ Quick Usage ```python from src.inference import EmotionShiftPipeline pipeline = EmotionShiftPipeline() conversation = [ "I am feeling okay today", "This is getting frustrating", "Now I am really angry" ] result = pipeline(conversation) print(result) ``` --- ## πŸŽ›οΈ Gradio Demo ```bash python app.py ``` --- ## 🧠 How It Works 1. Text Preprocessing 2. Emotion Classification 3. Shift Detection 4. Explanation Engine