Instructions to use baunef/PopFit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use baunef/PopFit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="baunef/PopFit")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("baunef/PopFit") model = AutoModel.from_pretrained("baunef/PopFit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -13,9 +13,11 @@ language:
|
|
| 13 |
library_name: sentence-transformers
|
| 14 |
---
|
| 15 |
|
| 16 |
-
#
|
| 17 |
|
| 18 |
-
This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for
|
|
|
|
|
|
|
| 19 |
|
| 20 |
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
| 21 |
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
|
@@ -41,6 +43,7 @@ preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst
|
|
| 41 |
|
| 42 |
## BibTeX entry and citation info
|
| 43 |
|
|
|
|
| 44 |
```bibtex
|
| 45 |
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
| 46 |
doi = {10.48550/ARXIV.2209.11055},
|
|
|
|
| 13 |
library_name: sentence-transformers
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# PopFit
|
| 17 |
|
| 18 |
+
This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for detecting German-language populism. It is a binary classification model that was trained using diverse set of German-language texts, with a particular focus on news data.
|
| 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.
|
|
|
|
| 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},
|