Update README.md
Browse files
README.md
CHANGED
|
@@ -9,7 +9,9 @@ pipeline_tag: text-classification
|
|
| 9 |
|
| 10 |
# /private/var/folders/6b/0g07c1bd5nx_dqlnklk5kq5h0000gn/T/tmpn6ptrcp2/JohanHeinsen/PE_header_classifier
|
| 11 |
|
| 12 |
-
This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification.
|
|
|
|
|
|
|
| 13 |
|
| 14 |
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
| 15 |
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
|
@@ -30,9 +32,13 @@ from setfit import SetFitModel
|
|
| 30 |
# Download from Hub and run inference
|
| 31 |
model = SetFitModel.from_pretrained("/private/var/folders/6b/0g07c1bd5nx_dqlnklk5kq5h0000gn/T/tmpn6ptrcp2/JohanHeinsen/PE_header_classifier")
|
| 32 |
# Run inference
|
| 33 |
-
preds = model(["
|
| 34 |
```
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
## BibTeX entry and citation info
|
| 37 |
|
| 38 |
```bibtex
|
|
|
|
| 9 |
|
| 10 |
# /private/var/folders/6b/0g07c1bd5nx_dqlnklk5kq5h0000gn/T/tmpn6ptrcp2/JohanHeinsen/PE_header_classifier
|
| 11 |
|
| 12 |
+
This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. It was created to identify headers in the publication Politiets Efterretninger (1867–1890)
|
| 13 |
+
|
| 14 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
| 15 |
|
| 16 |
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
| 17 |
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
|
|
|
| 32 |
# Download from Hub and run inference
|
| 33 |
model = SetFitModel.from_pretrained("/private/var/folders/6b/0g07c1bd5nx_dqlnklk5kq5h0000gn/T/tmpn6ptrcp2/JohanHeinsen/PE_header_classifier")
|
| 34 |
# Run inference
|
| 35 |
+
preds = model(["VI. Andre meddelelser", "1) Reserven er løbet bort."])
|
| 36 |
```
|
| 37 |
|
| 38 |
+
## Metrics:
|
| 39 |
+
Accuracy: 0.9977494373593399
|
| 40 |
+
F1: 0.953125
|
| 41 |
+
|
| 42 |
## BibTeX entry and citation info
|
| 43 |
|
| 44 |
```bibtex
|