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
|
@@ -28,7 +28,7 @@ An English sequence classification model, trained on MBAD Dataset to detect bias
|
|
| 28 |
| 76.97 | 62.00 | 0.45 | 0.96 |
|
| 29 |
|
| 30 |
## Usage
|
| 31 |
-
The easiest way is to load through the pipeline object offered by transformers library.
|
| 32 |
```python
|
| 33 |
from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
|
| 34 |
from transformers import pipeline
|
|
|
|
| 28 |
| 76.97 | 62.00 | 0.45 | 0.96 |
|
| 29 |
|
| 30 |
## Usage
|
| 31 |
+
The easiest way is to load the inference api from huggingface and second method is through the pipeline object offered by transformers library.
|
| 32 |
```python
|
| 33 |
from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
|
| 34 |
from transformers import pipeline
|