real-jiakai's picture
First model version
22d1543
metadata
library_name: transformers
license: mit
base_model: base-uncased
tags:
  - bert
  - fine-tuning
  - text-classification
model-index:
  - name: NLP_with_Disaster_Tweets
    results:
      - task:
          type: text-classification
          name: Text Classification
        metrics:
          - name: Accuracy
            type: accuracy
            value: 0.835
language:
  - en

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}
}