BeToast's picture
Update README.md
e440ebe
|
raw
history blame
1.36 kB
---
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
```