Downloads · 30 days
14
5% of all-time downloads
z-dickson/BART_political_event_detection
BART_political_event_detection is a summarization model from z-dickson. Use it when you need a shorter version of a longer text. The card lists the license as apache-2.0.
A sequence-to-sequence model fine-tuned to extract structured event summaries from European political party press releases and output strict JSON with four fields:
Downloads · 30 days
14
5% of all-time downloads
All-time downloads
275
Public
Parameters
611M
7.4 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors2.4 GB · 99%
From the Hugging Face model README
A sequence-to-sequence model fine-tuned to extract structured event summaries from European political party press releases and output strict JSON with four fields:
{
"response_to_event": "Yes" | "No",
"event_name": "string or null",
"country": "string or null",
"political_issue": "string or null"
}
Intended uses
Out of scope / limitations
Note: labels for event_name and political_issue are inherently noisy (free-text, long-tail), which is reflected in evaluation.
(Exact strings from trainer.evaluate())
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import torch, json
model_id = "https://huggingface.co/z-dickson/BART_political_event_detection"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id).to("cuda" if torch.cuda.is_available() else "cpu")
text = "Following the devastating floods in Slovenia, our party calls for stronger climate resilience measures."
inputs = tok(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=128)
response = tok.decode(outputs[0], skip_special_tokens=True)
response_json = json.loads(response)
response_json
{
"response_to_event": "Yes",
"event_name": "Floods in Slovenia",
"country": "Slovenia",
"political_issue": "Climate adaptation policy"
}