Update README.md
Browse files
README.md
CHANGED
@@ -1,12 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
-
title: Text Emotion Detection
|
3 |
-
emoji: π»
|
4 |
-
colorFrom: yellow
|
5 |
-
colorTo: blue
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 5.29.0
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
---
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
1 |
+
Emotion Detection from Text using BERT
|
2 |
+
|
3 |
+
Welcome to the Emotion Detection Web App. This application uses a fine-tuned BERT model to detect human emotions from short pieces of text.
|
4 |
+
|
5 |
+
#Description
|
6 |
+
|
7 |
+
This project leverages the `nateraw/bert-base-uncased-emotion` model from Hugging Face Transformers to classify input text into one of six emotions:
|
8 |
+
|
9 |
+
- π’ Sadness
|
10 |
+
- π Joy
|
11 |
+
- π Love
|
12 |
+
- π‘ Anger
|
13 |
+
- π± Fear
|
14 |
+
- π² Surprise
|
15 |
+
|
16 |
+
It uses:
|
17 |
+
-Hugging Face Transformers** for model and tokenizer
|
18 |
+
-PyTorch for deep learning inference
|
19 |
+
-Gradio to build an interactive web interface
|
20 |
+
|
21 |
+
Model Used
|
22 |
+
|
23 |
+
Model Name: `nateraw/bert-base-uncased-emotion`
|
24 |
+
Base Architecture: BERT (uncased)
|
25 |
+
Dataset: GoEmotions subset
|
26 |
+
|
27 |
+
How It Works
|
28 |
+
|
29 |
+
1. You type a sentence like:
|
30 |
+
> "I just got a new job!"
|
31 |
+
|
32 |
+
2. The model analyzes the text and returns the predicted emotion with confidence score.
|
33 |
+
|
34 |
+
|
35 |
+
Dependencies
|
36 |
+
|
37 |
+
Dependencies are defined in `requirements.txt`:
|
38 |
+
- `transformers`
|
39 |
+
- `torch`
|
40 |
+
- `gradio`
|
41 |
+
|
42 |
+
|
43 |
+
Use Cases
|
44 |
+
|
45 |
+
- Social media sentiment analysis
|
46 |
+
- Customer feedback classification
|
47 |
+
- Chatbot emotion understanding
|
48 |
+
- Mental health applications
|
49 |
+
|
50 |
+
|
51 |
+
**Author
|
52 |
+
|
53 |
+
- **Sujith Kumar**
|
54 |
+
- Hugging Face: [@sujith13082003](https://huggingface.co/sujith13082003)
|
55 |
+
|
56 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
+
## π License
|
59 |
+
|
60 |
+
This project is for educational and research purposes. Refer to individual library licenses for commercial use.
|
61 |
+
|