Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -1,14 +1,59 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
colorFrom: pink
|
5 |
colorTo: yellow
|
6 |
-
sdk:
|
7 |
-
sdk_version: 5.30.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
11 |
-
short_description:
|
12 |
---
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
title: Emoji Offensive Agent
|
3 |
+
emoji: 🧠
|
4 |
colorFrom: pink
|
5 |
colorTo: yellow
|
6 |
+
sdk: streamlit
|
|
|
7 |
app_file: app.py
|
8 |
pinned: false
|
9 |
license: apache-2.0
|
10 |
+
short_description: Detects offensive emoji-based social media content.
|
11 |
---
|
12 |
|
13 |
+
# 🧠 Emoji Offensive Agent
|
14 |
+
|
15 |
+
This AI agent aims to detect hate speech or offensive content in social media texts, especially those that include **emojis**, **homophones**, or **subculture wordplay**.
|
16 |
+
|
17 |
+
It combines two pipelines:
|
18 |
+
|
19 |
+
1. **Emoji Translator** – Based on the fine-tuned `Qwen1.5-7B-Chat` model to convert emoji expressions into Chinese text.
|
20 |
+
2. **Hate Speech Classifier** – Uses a large pre-trained classifier (e.g., `roberta-offensive-language-detection`) to determine whether the final text is offensive (label `1`) or not (label `0`).
|
21 |
+
|
22 |
+
---
|
23 |
+
|
24 |
+
## 📦 Project Files
|
25 |
+
|
26 |
+
- `app.py`: The Streamlit app entry point.
|
27 |
+
- `agent.py`: The core logic for emoji translation + classification pipeline.
|
28 |
+
- `README.md`: You're reading it!
|
29 |
+
- `.gitattributes`: LFS file config (for large model files, if any).
|
30 |
+
|
31 |
+
---
|
32 |
+
|
33 |
+
## 🚀 Deployment
|
34 |
+
|
35 |
+
This Space uses **Streamlit** as its frontend framework. The backend pipeline automatically performs:
|
36 |
+
1. Emoji-to-text translation
|
37 |
+
2. Classification using a powerful hate speech model
|
38 |
+
|
39 |
+
You can deploy it on Hugging Face Spaces by making sure:
|
40 |
+
|
41 |
+
- The `app.py` file exists in the root directory.
|
42 |
+
- This README is properly parsed (with valid YAML at the top).
|
43 |
+
|
44 |
+
---
|
45 |
+
|
46 |
+
## 📍Example
|
47 |
+
|
48 |
+
Input:
|
49 |
+
`你是 🐷`
|
50 |
+
|
51 |
+
Intermediate translation:
|
52 |
+
`你是猪鼻子`
|
53 |
+
|
54 |
+
Final classification:
|
55 |
+
**Offensive** 🔴 (`label: 1`)
|
56 |
+
|
57 |
+
---
|
58 |
+
|
59 |
+
Made with ❤️ by JenniferHJF
|