Instructions to use guymorlan/levanti_translate_ar_he with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use guymorlan/levanti_translate_ar_he with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="guymorlan/levanti_translate_ar_he")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("guymorlan/levanti_translate_ar_he") model = AutoModelForSeq2SeqLM.from_pretrained("guymorlan/levanti_translate_ar_he") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: cc-by-nc-4.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
datasets:
|
| 4 |
+
- guymorlan/levanti
|
| 5 |
+
language:
|
| 6 |
+
- ar
|
| 7 |
+
- he
|
| 8 |
+
pipeline_tag: translation
|
| 9 |
+
widget:
|
| 10 |
+
- text: بدي أروح ع الدكان بكرا
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Levanti (colloquial Levantine Arabic -> Hebrew) translator
|
| 14 |
+
|
| 15 |
+
Trained on the [Levanti](https://huggingface.co/datasets/guymorlan/levanti) dataset by fine-tuning [Helsinki-NLP/opus-mt-ar-he](https://huggingface.co/Helsinki-NLP/opus-mt-ar-he) for 8 epochs.
|
| 16 |
+
The model supports Palestinian, Jordanian, Syrian, Lebanese and Egyptian dialects.
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
# Example usage
|
| 20 |
+
|
| 21 |
+
```python
|
| 22 |
+
from transformers import pipeline
|
| 23 |
+
trans = pipeline("translation", "guymorlan/levanti_translate_ar_he")
|
| 24 |
+
trans("بدي أروح ع الدكان بكرا")
|
| 25 |
+
```
|
| 26 |
+
```
|
| 27 |
+
Out[1]: [{'translation_text': 'אני רוצה ללכת לחנות מחר'}]
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
# Attribution
|
| 31 |
+
Created by Guy Mor-Lan.<br>
|
| 32 |
+
Contact: guy.mor AT mail.huji.ac.il
|