Update README.md
Browse files
README.md
CHANGED
|
@@ -42,19 +42,3 @@ Binary classification (probability output):
|
|
| 42 |
|
| 43 |
---
|
| 44 |
|
| 45 |
-
## Usage Example
|
| 46 |
-
|
| 47 |
-
```python
|
| 48 |
-
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 49 |
-
import torch
|
| 50 |
-
|
| 51 |
-
tokenizer = AutoTokenizer.from_pretrained("HussainKAUST/saudi-eou-model")
|
| 52 |
-
model = AutoModelForSequenceClassification.from_pretrained("HussainKAUST/saudi-eou-model")
|
| 53 |
-
|
| 54 |
-
text = "ابي احجز موعد بس ..."
|
| 55 |
-
inputs = tokenizer(text, return_tensors="pt")
|
| 56 |
-
|
| 57 |
-
with torch.no_grad():
|
| 58 |
-
prob = torch.sigmoid(model(**inputs).logits).item()
|
| 59 |
-
|
| 60 |
-
print("EOU probability:", prob)
|
|
|
|
| 42 |
|
| 43 |
---
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|