|
--- |
|
license: apache-2.0 |
|
tags: |
|
- setfit |
|
- sentence-transformers |
|
- text-classification |
|
pipeline_tag: text-classification |
|
base_model: |
|
- JohanHeinsen/Old_News_Segmentation_SBERT_V0.1 |
|
--- |
|
# Runaway_advertisement_identifier |
|
|
|
This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model is designed to identify runaway advertisements from early modern Danish newspapers. It was created from a sample of 4000 texts, of which half where runaway advertisements. It was created by Johan Heinsen and Sofus Landor Dam. |
|
|
|
Base model: JohanHeinsen/Old_News_Segmentation_SBERT_V0.1 |
|
|
|
## Metrics |
|
Accuracy: 0.99333 |
|
F1: 0.99304 |
|
|
|
## Get started like this: |
|
``` |
|
from setfit import SetFitModel |
|
|
|
model = SetFitModel.from_pretrained("JohanHeinsen/Runaway_advertisement_identifier_V1") |
|
|
|
preds = model(["Min tjenstepige løb væk fra mig i nat", "Soldaten Jonas er forsvundet fra mit hus. Enhver bedes paagribe ham, om muligt. Han bærer en sort frakke.", "Jeg savner min hund."]) |
|
|
|
label_map = {0: "nej", 1: "ja"} |
|
|
|
predicted_labels = [label_map[int(preds[0])], label_map[int(preds[1])]] |
|
|
|
predicted_labels |
|
``` |