File size: 1,396 Bytes
33c9577
0a3b214
 
 
 
 
 
 
 
 
 
 
c9f2359
d9141d8
fb3b4a6
0a3b214
33c9577
0a3b214
 
 
 
 
6be41af
0a3b214
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
language: "en"
tags:
- distilroberta
- sentiment
- NSFW
- inappropriate 
- spam
- twitter
- reddit

widget:
- text: "I like you. You remind me of me when I was young and stupid."
- text: "I see you’ve set aside this special time to humiliate yourself in public."
- text: "Have a great weekend! See you next week!"

---

# Fine-tuned DistilRoBERTa-base for NSFW Classification

# Model Description 

DistilBERT is a transformer model that performs sentiment analysis. I fine-tuned the model on Reddit posts with the purpose of classifying not safe for work (NSFW) content, specifically text that is considered inappropriate and unprofessional. The model predicts 2 classes, which are NSFW or safe for work (SFW). 

The model is a fine-tuned version of [DistilBERT](https://huggingface.co/docs/transformers/model_doc/distilbert).

It was fine-tuned on 14317 Reddit posts pulled from the (Reddit API) [https://praw.readthedocs.io/en/stable/].

# How to Use 

```python
from transformers import pipeline
classifier = pipeline("sentiment-analysis", model="michellejieli/NSFW_text_classification")
classifier("I see you’ve set aside this special time to humiliate yourself in public.")
```

```python
Output:
[{'label': 'NSFW', 'score': 0.998853325843811}]
```

# Contact

Please reach out to [michelle.li851@duke.edu](mailto:michelle.li851@duke.edu) if you have any questions or feedback.

---