How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="Aryan047/Dynamic-event-detector")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("Aryan047/Dynamic-event-detector")
model = AutoModelForSequenceClassification.from_pretrained("Aryan047/Dynamic-event-detector")
Quick Links

Meme vs Real Event Tweet Classifier

Fine-tuned bert-base-uncased that classifies a tweet as either a meme / low-signal cultural post or a real-world event (breaking news, infrastructure outages, disasters, politics, etc.).

  • Base model: bert-base-uncased
  • Task: binary sequence classification
  • Labels: 0 = meme, 1 = real_event
  • Max sequence length: 128 tokens
  • Preprocessing: lowercase, strip URLs / mentions / hashtags / non-word chars

Quick start

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch, torch.nn.functional as F

repo = "Aryan047/Dynamic-event-detector"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo).eval()

text = "Massive 6.5 earthquake just rocked Istanbul, buildings swaying"
enc = tokenizer(text, truncation=True, max_length=128, return_tensors="pt")
probs = F.softmax(model(**enc).logits[0], dim=-1).tolist()
print({"meme": probs[0], "real_event": probs[1]})

Training pipeline

Clusters of tweets were auto-labeled against the GDELT DOC 2.0 API using a lifespan-aware heuristic, then BERT was fine-tuned on an 80/20 split. See the companion notebook meme_vs_event_classifier.ipynb for the full pipeline.

Downloads last month
19
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using Aryan047/Dynamic-event-detector 1