jenniferhk008 commited on
Commit
d863b26
·
verified ·
1 Parent(s): 5eec73a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +48 -3
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Social media Offensive Agent
3
  emoji: 🧠
4
  colorFrom: pink
5
  colorTo: yellow
@@ -8,7 +8,52 @@ app_file: app.py
8
  pinned: false
9
  license: apache-2.0
10
  short_description: Detects offensive emoji-based social media content.
11
- sdk_version: 1.45.1
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Emoji Offensive Agent
3
  emoji: 🧠
4
  colorFrom: pink
5
  colorTo: yellow
 
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