Instructions to use d4data/bias-detection-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use d4data/bias-detection-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="d4data/bias-detection-model")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("d4data/bias-detection-model") model = AutoModelForSequenceClassification.from_pretrained("d4data/bias-detection-model") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -27,6 +27,7 @@ An English Classification model, trained on MBAD Dataset to detect bias and fair
|
|
| 27 |
|
| 28 |
## Usage
|
| 29 |
```python
|
|
|
|
| 30 |
from transformers import pipeline
|
| 31 |
tokenizer = AutoTokenizer.from_pretrained("dreji18/bias-detection-model", use_auth_token=True)
|
| 32 |
model = TFAutoModelForSequenceClassification.from_pretrained("dreji18/bias-detection-model", use_auth_token=True)
|
|
|
|
| 27 |
|
| 28 |
## Usage
|
| 29 |
```python
|
| 30 |
+
from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
|
| 31 |
from transformers import pipeline
|
| 32 |
tokenizer = AutoTokenizer.from_pretrained("dreji18/bias-detection-model", use_auth_token=True)
|
| 33 |
model = TFAutoModelForSequenceClassification.from_pretrained("dreji18/bias-detection-model", use_auth_token=True)
|