Downloads · 30 days
4
19% of all-time downloads
shaqaqio/my_model
my_model is a machine learning model from shaqaqio. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains a custom PyTorch model for End-of-Utterance (EOU) detection in Arabic conversational text. The model predicts whether a given text segment represents the end of a speaker’s turn.
Downloads · 30 days
4
19% of all-time downloads
All-time downloads
21
Public
Repo size
653 MB
Likes
0
Public
Click a slice to open those files.
.pt653 MB · 100%
From the Hugging Face model README
This repository contains a custom PyTorch model for End-of-Utterance (EOU) detection in Arabic conversational text.
The model predicts whether a given text segment represents the end of a speaker’s turn.
This is a custom architecture (not a Hugging Face AutoModel) and is intended for research and development use.
Given an input text segment, the model outputs a binary prediction:
0 → The speaker is expected to continue speaking1 → The speaker has finished their turnEOUClassifierThis model uses the tokenizer from:
Omartificial-Intelligence-Space/SA-BERT-V1
The tokenizer is not included in this repository and must be loaded separately.
model.py — Model architecture (EOUClassifier)model.pt — Trained model weightsconfig.json — Model configurationREADME.md — This fileimport torch
from transformers import AutoTokenizer
from model import EOUClassifier
tokenizer = AutoTokenizer.from_pretrained(
"Omartificial-Intelligence-Space/SA-BERT-V1"
)
model = EOUClassifier()
model.load_state_dict(
torch.load("model.pt", map_location="cpu")
)
model.eval()
examples = ["مقصدي من الموضوع انه", "اتمنى تقدر تساعدني"]
batch = tokenizer(examples, padding=True, truncation=True, return_tensors="pt")
batch.to(device)
out = model(batch["input_ids"], batch["attention_mask"])
MIT