Text Classification
Transformers
Safetensors
PyTorch
distilbert
disaster-detection
text-embeddings-inference
Instructions to use mahmad932/disaster-tweet-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mahmad932/disaster-tweet-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="mahmad932/disaster-tweet-classifier")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("mahmad932/disaster-tweet-classifier") model = AutoModelForSequenceClassification.from_pretrained("mahmad932/disaster-tweet-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Disaster Tweet Classification using DistilBERT
Model Description
This model classifies whether a tweet is related to a real disaster or not using the DistilBERT transformer model. It was fine-tuned on the Kaggle "Natural Language Processing with Disaster Tweets" dataset.
Dataset
Dataset: Natural Language Processing with Disaster Tweets (Kaggle)
Labels:
- 0 = Not Disaster
- 1 = Disaster
Model
- Base Model: distilbert-base-uncased
- Framework: Hugging Face Transformers
- Task: Binary Text Classification
Training Details
- Epochs: 3
- Learning Rate: 2e-5
- Batch Size: 16
- Optimizer: AdamW
Evaluation Results
| Metric | Score |
|---|---|
| Accuracy | 82.52% |
| Precision | 82.52% |
| Recall | 82.52% |
| F1-Score | 82.39% |
Example
Input:
A massive earthquake destroyed several buildings.
Prediction:
Disaster
Limitations
- The model may misclassify sarcastic or ambiguous tweets.
- Performance depends on the quality of the input text.
Intended Use
This model is intended for educational purposes and disaster tweet classification research.
Author
Muhammad Ahmad BS Computer Science
- Downloads last month
- 73