Update README.md
Browse files
README.md
CHANGED
|
@@ -1,27 +1,18 @@
|
|
| 1 |
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
tags:
|
| 4 |
-
- setfit
|
| 5 |
-
- sentence-transformers
|
| 6 |
-
- text-classification
|
| 7 |
-
- populism
|
| 8 |
-
- politics
|
| 9 |
-
- Populismus
|
| 10 |
pipeline_tag: text-classification
|
| 11 |
-
language:
|
| 12 |
-
- de
|
| 13 |
-
library_name: sentence-transformers
|
| 14 |
---
|
| 15 |
|
| 16 |
# PopFit
|
| 17 |
|
| 18 |
-
This is a [SetFit model](https://github.com/huggingface/setfit)
|
| 19 |
|
| 20 |
-
The model has been trained using an efficient few-shot learning technique that involves:
|
| 21 |
|
| 22 |
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
| 23 |
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
| 24 |
|
|
|
|
|
|
|
| 25 |
## Usage
|
| 26 |
|
| 27 |
To use this model for inference, first install the SetFit library:
|
|
@@ -39,20 +30,4 @@ from setfit import SetFitModel
|
|
| 39 |
model = SetFitModel.from_pretrained("baunef/PopFit")
|
| 40 |
# Run inference
|
| 41 |
preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"])
|
| 42 |
-
```
|
| 43 |
-
|
| 44 |
-
## BibTeX entry and citation info
|
| 45 |
-
|
| 46 |
-
SetFit:
|
| 47 |
-
```bibtex
|
| 48 |
-
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
| 49 |
-
doi = {10.48550/ARXIV.2209.11055},
|
| 50 |
-
url = {https://arxiv.org/abs/2209.11055},
|
| 51 |
-
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
| 52 |
-
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
| 53 |
-
title = {Efficient Few-Shot Learning Without Prompts},
|
| 54 |
-
publisher = {arXiv},
|
| 55 |
-
year = {2022},
|
| 56 |
-
copyright = {Creative Commons Attribution 4.0 International}
|
| 57 |
-
}
|
| 58 |
```
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
pipeline_tag: text-classification
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
# PopFit
|
| 6 |
|
| 7 |
+
This is a [SetFit model](https://github.com/huggingface/setfit) for German-language populism detection in news and media content. It was created as part of master thesis at the Hochschule für Politik @TUM.
|
| 8 |
|
| 9 |
+
The model is based on [deutsche-telekom/gbert-large-paraphrase-cosine](https://huggingface.co/deutsche-telekom/gbert-large-paraphrase-cosine) and has been trained using an efficient few-shot learning technique that involves:
|
| 10 |
|
| 11 |
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
| 12 |
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
| 13 |
|
| 14 |
+
The model generates binary classification labels with 0 as the `non-populist` and 1 as the `populist` class.
|
| 15 |
+
|
| 16 |
## Usage
|
| 17 |
|
| 18 |
To use this model for inference, first install the SetFit library:
|
|
|
|
| 30 |
model = SetFitModel.from_pretrained("baunef/PopFit")
|
| 31 |
# Run inference
|
| 32 |
preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
```
|