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
| license: cc-by-nc-4.0 | |
| datasets: | |
| - guymorlan/levanti | |
| language: | |
| - ar | |
| - he | |
| pipeline_tag: translation | |
| widget: | |
| - text: بدي أروح ع الدكان بكرا | |
| # Levanti (colloquial Levantine Arabic -> Hebrew) translator | |
| 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. | |
| The model supports Palestinian, Jordanian, Syrian, Lebanese and Egyptian dialects. | |
| # Example usage | |
| ```python | |
| from transformers import pipeline | |
| trans = pipeline("translation", "guymorlan/levanti_translate_ar_he") | |
| trans("بدي أروح ع الدكان بكرا") | |
| ``` | |
| ``` | |
| Out[1]: [{'translation_text': 'אני רוצה ללכת לחנות מחר'}] | |
| ``` | |
| # Attribution | |
| Created by Guy Mor-Lan.<br> | |
| Contact: guy.mor AT mail.huji.ac.il |