Edit model card

Model Card for climate-filter-FB

Model Description

This is the fine-tuned climate detection language model with a classification head for detecting climate-related Facebook Posts.

The climate-filter-FB model is fine-tuned using the climatebert/distilroberta-base-climate-detector language model as starting point. It has been fine-tuned on a dataset containing (translated) Facebook Posts of government communication.

Note: This model is trained on full posts. It may not perform well on sentences or other data sources.

How to Get Started With the Model

You can use the model with a pipeline for text classification:

from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
from transformers.pipelines.pt_utils import KeyDatasetimport datasets
from tqdm.auto import tqdm
model_name = "frwagner/climate_filter_Fb"

# If you want to use your own data, simply load them as 🤗 Datasets dataset, see https://huggingface.co/docs/datasets/loading
dataset = datasets.load_dataset(dataset_name, split="test")

model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name, max_len=512)

pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, device=0)
# See https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline

outputs = []

for text in tqdm(dataset['text']):
    output = pipe(text, padding=True, truncation=True)
    outputs.append(output)
Downloads last month
9
Safetensors
Model size
82.3M params
Tensor type
F32
·
Inference Examples
Unable to determine this model's library. Check the docs .

Model tree for frwagner/climate_detector_Fb

Finetuned
(3)
this model