Edit model card

Disaster Tweets Classification

This model is fine-tuned BERT for classifying whether a tweet is about a real disaster or not.

Model Description

  • Based on bert-base-uncased
  • Fine-tuned for binary classification task
  • Achieves 83.5% accuracy on validation set
  • Trained on Kaggle's "Natural Language Processing with Disaster Tweets" competition dataset

How to Use

from transformers import AutoConfig, AutoTokenizer, AutoModelForSequenceClassification

# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("real-jiakai/NLP_with_Disaster_Tweets")
model = AutoModelForSequenceClassification.from_pretrained("real-jiakai/NLP_with_Disaster_Tweets")

# Example usage
text = "There was a major earthquake in California"
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=512)
outputs = model(**inputs)
predicted_class = outputs.logits.argmax(-1).item()

License

This model is licensed under the MIT License.

Citation

If you use this model in your work, please cite:

@misc{NLP_with_Disaster_Tweets,
  author       = {real-jiakai},
  title        = {NLP_with_Disaster_Tweets},
  year         = {2024},
  url          = {https://huggingface.co/real-jiakai/NLP_with_Disaster_Tweets},
  publisher    = {Hugging Face}
}
Downloads last month
5
Safetensors
Model size
109M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.