Text Classification
Transformers
PyTorch
English
roberta
distilroberta
topic
news
text-embeddings-inference
Instructions to use dell-research-harvard/topic-fire with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dell-research-harvard/topic-fire with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="dell-research-harvard/topic-fire")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("dell-research-harvard/topic-fire") model = AutoModelForSequenceClassification.from_pretrained("dell-research-harvard/topic-fire", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from dell-research-harvard/topic-fire: direct link, hf CLI and curl.
- Browser
- Download file 1.46 kB
-
https://huggingface.co/dell-research-harvard/topic-fire/resolve/main/README.md
- Command line
-
hf download hf://dell-research-harvard/topic-fire/README.md
-
curl -L -o README.md https://huggingface.co/dell-research-harvard/topic-fire/resolve/main/README.md
1.46 kB
metadata
license: cc-by-4.0
language:
- en
pipeline_tag: text-classification
tags:
- distilroberta
- topic
- news
Fine-tuned distilroberta-base for detecting news on fires
Model Description
This model is a finetuned distilroberta-base, for classifying whether news articles are about fires.
How to Use
from transformers import pipeline
classifier = pipeline("text-classification", model="dell-research-harvard/topic-fire")
classifier("Building destroyed by fire")
Training data
The model was trained on a hand-labelled sample of data from the NEWSWIRE dataset.
| Split | Size |
|---|---|
| Train | 554 |
| Dev | 118 |
| Test | 118 |
Test set results
| Metric | Result |
|---|---|
| F1 | 0.9709 |
| Accuracy | 0.9746 |
| Precision | 0.9434 |
| Recall | 1.0000 |
Citation Information
You can cite this dataset using
@misc{silcock2024newswirelargescalestructureddatabase,
title={Newswire: A Large-Scale Structured Database of a Century of Historical News},
author={Emily Silcock and Abhishek Arora and Luca D'Amico-Wong and Melissa Dell},
year={2024},
eprint={2406.09490},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2406.09490},
}
Applications
We applied this model to a century of historical news articles. You can see all the classifications in the NEWSWIRE dataset.