Views
No views yet
nihad-ask/Arabert-EOU-detection-modelaubmindlab/bert-base-arabertv2| Label | Meaning |
|---|---|
| 0 | Speaker will continue (NOT end of turn) |
| 1 | End of turn (EOU detected) |
0.9539| Class | Precision | Recall | F1-score | Support |
|---|---|---|---|---|
| 0 – Continue | 0.9494 | 0.9589 | 0.9541 | 1702 |
| 1 – End of Turn | 0.9585 | 0.9489 | 0.9536 | 1702 |
| Metric | Score |
|---|---|
| Accuracy | 0.9539 |
| Macro Avg F1 | 0.9539 |
| Weighted Avg F1 | 0.9539 |
| Total Samples | 3404 |
0.8919| Class | Precision | Recall | F1-score | Support |
|---|---|---|---|---|
| 0 – Continue | 0.7671 | 0.9445 | 0.8466 | 3097 |
| 1 – End of Turn | 0.9713 | 0.8676 | 0.9165 | 6705 |
| Metric | Score |
|---|---|
| Accuracy | 0.8919 |
| Macro Avg F1 | 0.8815 |
| Weighted Avg F1 | 0.8944 |
| Total Samples | 9802 |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4model_name = "nihad-ask/Arabert-EOU-detection-model"
5
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModelForSequenceClassification.from_pretrained(model_name)
8
9text = "تمام و بعدين؟"
10
11inputs = tokenizer(text, return_tensors="pt")
12outputs = model(**inputs)
13prediction = torch.argmax(outputs.logits, dim=1).item()
14
15if prediction == 1:
16 print("End of turn")
17else:
18 print("Speaker will continue")