File size: 1,364 Bytes
1b791a9 4c0e538 97c5aaf d9fe47f 4c0e538 1b791a9 e440ebe 1b791a9 d9fe47f 1b791a9 d9fe47f 1b791a9 d9fe47f |
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 |
---
license: apache-2.0
tags:
- setfit
- sentence-transformers
- text-classification
pipeline_tag: text-classification
---
# /content/model
This model is used for binary classification of racially/culturally exclusive or exclusive sentences in French and English languages.
It is a fine-tuned model of [morit/french_xlm_xnli](https://huggingface.co/morit/french_xlm_xnli)
on [this dataset](https://github.com/BeToast/Racially-Exclusive-Speech-Detection/tree/main/final/data_ready)
with [SetFit model](https://github.com/huggingface/setfit)
This model generalizes exclusivity well which is shown by the ability to detect exclusivity even to fictional races.
All code for entire experiments is in my [gitrepo](https://github.com/BeToast/Racially-Exclusive-Speech-Detection)
## Usage
##### Use example [Google Collab notebook](https://colab.research.google.com/drive/1EABmyXsjQihRS1W9If-weg-lR8i4xn_4?usp=sharing)
##### Use this model in your own code:
```bash
python -m pip install setfit
```
You can then run predictions with the model:
```python
from setfit import SetFitModel
# Download from Hub and run inference
model = SetFitModel.from_pretrained("/content/model")
# Run inclusive or exclusive binary classification.
predictions = model(["Elves are all snobs", "Elves are known for their high intelligence and wealth"])
predictions
```
|