YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

FastText Climate Classifier

FastText supervised classifier trained on newspaper data for climate content detection.

Model Performance

  • Precision: 82.7%
  • Recall: 84.7%
  • Accuracy: 93.2%
  • Climate F1: 83.7%

Confusion Matrix

Predicted Climate Predicted Other
Actual Climate TP: 3846 FN: 695
Actual Other FP: 807 TN: 17433

Files

  • fasttext_climate.bin - Trained FastText model
  • chunk_labels.jsonl - Training data (220K labeled chunks)
  • fasttext_train.txt - Training file
  • fasttext_valid.txt - Validation file
  • keywords.txt - Climate/nature keywords
  • evaluation_metrics.json - Full metrics
  • training_config.json - Training configuration

Usage

import fasttext
from fasttext.FastText import _FastText as FastTextModel

# NumPy 2.x compatibility patch
def patched_predict(self, text, k=1, threshold=0.0, on_unicode_error='strict'):
    import warnings
    with warnings.catch_warnings():
        warnings.simplefilter("ignore")
        result = self.f.predict(text, k, threshold, on_unicode_error)
        if result:
            probs = [float(p) for p, _ in result]
            labels = [l for _, l in result]
            return tuple(labels), probs
        else:
            return (), []

FastTextModel.predict = patched_predict

# Load model
model = fasttext.load_model('fasttext_climate.bin')

# Predict
labels, probs = model.predict('carbon emissions and global warming')
print(f'Label: {labels[0]}, Probability: {probs[0]:.4f}')
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support