Spaces:
Sleeping
A newer version of the Gradio SDK is available:
6.5.1
license: mit
title: Emotion Detection with DistilBERT
sdk: gradio
emoji: 📚
colorFrom: yellow
colorTo: blue
short_description: Use this space to identify the emotional content in text
README.md
Emotion Detection with DistilBERT
This Huggingface Space demonstrates emotion detection using the DistilBERT model fine-tuned for emotion classification. The model can detect six emotions: sadness, joy, love, anger, fear, and surprise.
Model Details
This app uses the bhadresh-savani/distilbert-base-uncased-emotion model, which is a fine-tuned version of DistilBERT specifically trained for emotion detection. The model was trained on a dataset containing text samples labeled with six different emotions.
Usage
- Enter any text in the input box
- Click "Submit" or press Enter
- The model will analyze the text and display the probability distribution of detected emotions
- Try the example inputs to see how the model performs on different types of text
Examples
The app includes several example inputs to demonstrate different emotional expressions. You can click on any example to see how the model interprets various emotional statements.
Limitations
- The model works best with English text
- Short to medium-length texts (1-3 sentences) typically work better than very long passages
- The model may not capture complex or mixed emotions perfectly
- Results are probabilistic and should be interpreted as the model's confidence in each emotion category
Setup Instructions
Create a new Space on Huggingface:
- Go to huggingface.co/spaces
- Click "Create new Space"
- Choose "Gradio" as the SDK
- Select "Public" or "Private" visibility
- Name your space
Upload these files to your Space:
- app.py
- requirements.txt
- README.md
The Space will automatically build and deploy your emotion detection app!
Space Configuration
This Space requires specific hardware and Python settings to run properly. Here's the configuration:
title: Emotion Detection with DistilBERT
emoji: 🎭
colorFrom: blue
colorTo: red
sdk: gradio
sdk_version: 4.0.0
python_version: 3.10
app_file: app.py
pinned: false
license: mit