Downloads · 30 days
46
29% of all-time downloads
sakibalfahim/CrisisPulse
CrisisPulse is a text classification model from sakibalfahim. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
A compact, fine-tuned BERT model to classify tweets as Disaster or Not Disaster. It is a lightweight disaster-intent classifier optimized for short-form social media text. Designed for fast inference, containerized de…
Downloads · 30 days
46
29% of all-time downloads
All-time downloads
156
Public
Parameters
109M
1.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
A compact, fine-tuned BERT model to classify tweets as Disaster or Not Disaster. It is a lightweight disaster-intent classifier optimized for short-form social media text. Designed for fast inference, containerized deployment, and reproducible research.
IMPORTANT NOTE: Class imbalance was INTENTIONALLY preserved to reflect real-world disaster distribution. See training notebook for detailed rationale.
bert-base-uncased0 → Not Disaster1 → Disasterfrom transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
repo_id = 'sakibalfahim/CrisisPulse'
token = 'hf_xxx' # use secure token or Hugging Face login
tokenizer = AutoTokenizer.from_pretrained(repo_id, token=token)
model = AutoModelForSequenceClassification.from_pretrained(repo_id, token=token)
model.eval()
inputs = tokenizer('Massive flood reported in downtown area', return_tensors='pt', truncation=True)
with torch.no_grad():
logits = model(**inputs).logits
pred = int(logits.argmax(-1)[0].item())
print('Prediction:', {0: 'Not Disaster', 1: 'Disaster'}[pred])
bert-base-uncasedIntended for research/demo use. Validate on your domain before any high-stakes use. Be cautious with domain shift, sarcasm, or non-English text.
Check the notebook for exact preprocessing, hyperparameters, and seed.
Apache-2.0 License.
Author: sakibalfahim — via Hugging Face profile.