Downloads · 30 days
4
7% of all-time downloads
BilalChafi/distilbert-disaster-tweet-classification
distilbert-disaster-tweet-classification is a machine learning model from BilalChafi. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a fine-tuned version of DISTILBERT for classifying tweets as either relating to real disasters or not.
Downloads · 30 days
4
7% of all-time downloads
All-time downloads
59
Public
Parameters
67M
268 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of DISTILBERT for classifying tweets as either relating to real disasters or not.
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("your-username/your-model-name")
tokenizer = AutoTokenizer.from_pretrained("your-username/your-model-name")
# Example usage
text = "There's a wildfire spreading rapidly near the city."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
prediction = outputs.logits.argmax().item()
print("Disaster" if prediction == 1 else "Not a Disaster")
Replace "your-username/your-model-name" with your Hugging Face username and chosen model name.