Update README.md
Browse files
README.md
CHANGED
|
@@ -11,23 +11,20 @@ base_model:
|
|
| 11 |
tags:
|
| 12 |
- text2text-generation
|
| 13 |
---
|
| 14 |
-
# Arabic
|
| 15 |
|
| 16 |
-
|
| 17 |
-
The model is designed to translate an Israeli Arabic dialect
|
| 18 |
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
```python
|
| 23 |
-
from transformers import pipeline
|
| 24 |
-
trans = pipeline("translation", "HebArabNlpProject/mt-ar-he")
|
| 25 |
-
trans("رحت أشتري كتاب")
|
| 26 |
-
```
|
| 27 |
-
```
|
| 28 |
-
Out[1]: [{'translation_text': 'הלכתי לקנות ספר'}]
|
| 29 |
-
```
|
| 30 |
|
| 31 |
-
#
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
tags:
|
| 12 |
- text2text-generation
|
| 13 |
---
|
| 14 |
+
# Arabic to Hebrew Translator (Israeli Arabic Dialect)
|
| 15 |
|
| 16 |
+
This model is a fine-tuned version of [Helsinki-NLP/opus-mt-ar-he](https://huggingface.co/Helsinki-NLP/opus-mt-ar-he) on an Israeli Arabic dialect corpus, trained for 15 epochs. It aims to translate informal conversational phrases in Israeli Arabic into Hebrew, making it suitable for applications involving colloquial or everyday expressions.
|
|
|
|
| 17 |
|
| 18 |
+
## Example Usage
|
| 19 |
|
| 20 |
+
Before using the fine-tuned model, load the tokenizer from the base model:
|
| 21 |
|
| 22 |
```python
|
| 23 |
+
from transformers import pipeline, AutoTokenizer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
+
# Load tokenizer from the base model
|
| 26 |
+
tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-ar-he")
|
| 27 |
+
|
| 28 |
+
# Initialize the translation pipeline with the fine-tuned model and base tokenizer
|
| 29 |
+
trans = pipeline("translation", model="HebArabNlpProject/mt-ar-he", tokenizer=tokenizer)
|
| 30 |
+
print(trans("رحت أشتري كتاب"))
|