Spaces:
Running
Running
| title: Emotion Text Classifier | |
| emoji: ๐ | |
| colorFrom: blue | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: 6.10.0 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| # Emotion Text Classifier | |
| Fine-tuned `roberta-base` on the [dair-ai/emotion](https://huggingface.co/datasets/dair-ai/emotion) dataset. | |
| Classifies text into 6 emotions: sadness, joy, love, anger, fear, surprise. | |
| ## Files | |
| | File | Purpose | | |
| |------|---------| | |
| | `train.py` | Fine-tune roberta-base on dair-ai/emotion (run on Colab) | | |
| | `push_to_hub.py` | Push trained model to HuggingFace Hub with model card | | |
| | `app.py` | Gradio demo app | | |
| | `requirements.txt` | Python dependencies | | |
| ## Quick Start (Colab) | |
| ```bash | |
| # 1. Install dependencies | |
| pip install transformers datasets scikit-learn accelerate | |
| # 2. Train | |
| python train.py | |
| # 3. Push to Hub (log in first: huggingface-cli login) | |
| python push_to_hub.py --repo_id your-username/emotion-roberta | |
| # 4. Test the demo locally | |
| pip install gradio | |
| python app.py | |
| ``` |