romiswd commited on
Commit
f6b1895
1 Parent(s): 7ff6c50

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -14
README.md CHANGED
@@ -11,23 +11,20 @@ base_model:
11
  tags:
12
  - text2text-generation
13
  ---
14
- # Arabic -> Hebrew translator
15
 
16
- Fine-tuning [Helsinki-NLP/opus-mt-ar-he](https://huggingface.co/Helsinki-NLP/opus-mt-ar-he) for 15 epochs.
17
- The model is designed to translate an Israeli Arabic dialect
18
 
 
19
 
20
- # Example usage
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
- # Attribution
32
- Created by Matrix
33
- Contact: Uri Meir
 
 
 
 
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("رحت أشتري كتاب"))