--- license: apache-2.0 language: - en tags: - text-classification - emotion-classification - bert - transformers base_model: bert-base-uncased pipeline_tag: text-classification library_name: transformers --- # Emotion BERT – Islamic Guidance Emotion Classifier A fine-tuned BERT model for detecting emotions in English text, built as part of **RUHI** — an AI-powered Islamic guidance platform that recommends Quranic verses, Hadith, and Duas based on a user's emotional state. ## Emotion Classes | Label | Description | |-------|-------------| | `neutral` | No strong emotion | | `sadness` | Sorrow or unhappiness | | `fear_anxiety` | Fear, stress, or nervousness | | `happiness_gratitude` | Joy, thankfulness, contentment | | `anger` | Irritation or rage | | `regret_repentance` | Guilt or seeking forgiveness | ## Model Details - **Base model:** `bert-base-uncased` - **Task:** Multi-label emotion classification (6 labels) - **Framework:** Hugging Face Transformers (PyTorch) - **Input:** English text (max 128 tokens) - **Output:** Probability score for each emotion ## Usage ```python from transformers import pipeline classifier = pipeline( "text-classification", model="hrrbb/emotion-bert", top_k=None, function_to_apply="sigmoid" ) text = "I feel so lost and overwhelmed." for r in classifier(text): print(f"{r['label']}: {r['score']:.4f}")