Views
No views yet
vehicle with two-wheeled vehicleTwo-wheeled vehicle–pedestrianvehicle with fixed object or ran off roadrollover or fallmultiple carvehicle–animalvehicle–pedestrianvehicle with single other vehicletwo-wheeled vehicle with two-wheeled vehiclebert-base-multilingual-cased| Task | Metric | Score |
|---|---|---|
| Crash Type Classification (9 classes) | Accuracy | 89.7% |
1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2
3model = AutoModelForSequenceClassification.from_pretrained("crash-information-extraction/BERT-Crashtype-Classification")
4tokenizer = AutoTokenizer.from_pretrained("crash-information-extraction/BERT-Crashtype-Classification")
5
6text = "تصادف دو خودرو در اتوبان"
7inputs = tokenizer(text, return_tensors="pt")
8outputs = model(**inputs)
9predicted_class = outputs.logits.argmax().item()
10# predicted_class is an integer from 0 to 8