Views
No views yet
pip install torch transformers1from transformers import AutoTokenizer, AutoModel
2import torch
3
4# Load model and tokenizer
5model_name = "mahmoudsaalama/arabic-eou-camelbert"
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModel.from_pretrained(model_name)
8
9# Prepare input
10text = "السلام عليكم ورحمة الله"
11inputs = tokenizer(text, return_tensors="pt", max_length=128, truncation=True)
12
13# Get prediction
14with torch.no_grad():
15 outputs = model(**inputs)
16 probability = torch.sigmoid(outputs.logits).item()
17 is_eou = probability > 0.5
18
19print(f"EOU Probability: {probability:.4f}")
20print(f"Is EOU: {is_eou}")pip install arabic-eou-sdk1from arabic_eou_sdk import ArabicEOUDetector
2
3detector = ArabicEOUDetector(model_name="mahmoudsaalama/arabic-eou-camelbert")
4result = detector.update_transcription("السلام عليكم", is_final=True)
5
6print(f"Is EOU: {result['is_eou']}")
7print(f"Probability: {result['probability']:.4f}")
8print(f"Confidence: {result['confidence']:.4f}")| Metric | Score |
|---|---|
| Accuracy | ~90% |
| Precision | ~88% |
| Recall | ~92% |
| F1 Score | ~90% |
| ROC AUC | ~95% |
| Configuration | Latency |
|---|---|
| GPU (FP32) | ~15-20ms |
| GPU (INT8) | ~8-12ms |
| CPU (FP32) | ~60-80ms |
| CPU (INT8) | ~25-35ms |
1@model{arabic_eou_camelbert_2025,
2 author = {Mahmoud Saalama},
3 title = {Arabic End-of-Utterance Detection Model},
4 year = {2025},
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/mahmoudsaalama/arabic-eou-camelbert}
7}