Upload content-moderation model for NEED AI
Browse files
README.md
CHANGED
|
@@ -1,55 +1,68 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: mit
|
| 3 |
tags:
|
| 4 |
- text-generation
|
| 5 |
-
-
|
|
|
|
|
|
|
| 6 |
- need-ai
|
| 7 |
-
|
| 8 |
pipeline_tag: text-classification
|
| 9 |
-
widget:
|
| 10 |
-
- text: "This is a great service!"
|
| 11 |
---
|
| 12 |
|
| 13 |
# NEED AI - Content Moderation
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
## Model Details
|
| 18 |
-
|
| 19 |
-
- **Base Model**:
|
| 20 |
-
- **
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
## Usage
|
| 23 |
|
| 24 |
```python
|
| 25 |
-
from transformers import
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
|
| 28 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
|
|
|
| 29 |
|
| 30 |
-
|
|
|
|
| 31 |
inputs = tokenizer(input_text, return_tensors="pt")
|
| 32 |
outputs = model.generate(**inputs)
|
| 33 |
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 34 |
print(result)
|
| 35 |
```
|
| 36 |
|
| 37 |
-
##
|
| 38 |
|
| 39 |
-
|
| 40 |
-
import requests
|
| 41 |
|
| 42 |
-
|
| 43 |
-
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
|
| 49 |
-
|
| 50 |
-
print(result)
|
| 51 |
-
```
|
| 52 |
|
| 53 |
-
|
| 54 |
-
- **GitHub**: https://github.com/Need-Service-App/need-ai-model
|
| 55 |
- **Email**: needserviceapp@gmail.com
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
license: mit
|
| 4 |
tags:
|
| 5 |
- text-generation
|
| 6 |
+
- question-answering
|
| 7 |
+
- sentence-similarity
|
| 8 |
+
- text-classification
|
| 9 |
- need-ai
|
| 10 |
+
base_model: unitary/toxic-bert
|
| 11 |
pipeline_tag: text-classification
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
# NEED AI - Content Moderation
|
| 15 |
|
| 16 |
+
BERT model for detecting toxic and inappropriate content in user messages and reviews.
|
| 17 |
|
| 18 |
## Model Details
|
| 19 |
+
|
| 20 |
+
- **Base Model**: unitary/toxic-bert
|
| 21 |
+
- **Task**: Text Classification
|
| 22 |
+
- **Fine-tuned for**: NEED Service Marketplace Platform
|
| 23 |
+
- **Language**: English
|
| 24 |
+
- **License**: MIT
|
| 25 |
|
| 26 |
## Usage
|
| 27 |
|
| 28 |
```python
|
| 29 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 30 |
+
# or AutoModelForSequenceClassification for moderation
|
| 31 |
+
# or SentenceTransformer for semantic-search
|
| 32 |
|
| 33 |
+
model_name = "yogami9/need-content-moderation"
|
| 34 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 35 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
| 36 |
|
| 37 |
+
# Example usage
|
| 38 |
+
input_text = "Your input here"
|
| 39 |
inputs = tokenizer(input_text, return_tensors="pt")
|
| 40 |
outputs = model.generate(**inputs)
|
| 41 |
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 42 |
print(result)
|
| 43 |
```
|
| 44 |
|
| 45 |
+
## Training Data
|
| 46 |
|
| 47 |
+
Trained on curated datasets specific to the NEED platform's service categories and user interactions.
|
|
|
|
| 48 |
|
| 49 |
+
## Limitations
|
|
|
|
| 50 |
|
| 51 |
+
- Optimized for English language
|
| 52 |
+
- Best performance on NEED platform-specific queries
|
| 53 |
+
- May require fine-tuning for other domains
|
| 54 |
|
| 55 |
+
## Contact
|
|
|
|
|
|
|
| 56 |
|
| 57 |
+
- **Organization**: NEED Service App
|
|
|
|
| 58 |
- **Email**: needserviceapp@gmail.com
|
| 59 |
+
- **GitHub**: https://github.com/Need-Service-App
|
| 60 |
+
|
| 61 |
+
## Related Models
|
| 62 |
+
|
| 63 |
+
All NEED AI models:
|
| 64 |
+
- [Category Recommendation](https://huggingface.co/yogami9/need-category-recommendation)
|
| 65 |
+
- [Chat Support](https://huggingface.co/yogami9/need-chat-support)
|
| 66 |
+
- [Service Description](https://huggingface.co/yogami9/need-service-description)
|
| 67 |
+
- [Semantic Search](https://huggingface.co/yogami9/need-semantic-search)
|
| 68 |
+
- [Content Moderation](https://huggingface.co/yogami9/need-content-moderation)
|