MubarakB commited on
Commit
921bf01
1 Parent(s): eed1eb5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +35 -0
README.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Luganda to English Informal Translation Model
2
+ This model translates informal Luganda sentences to English. It was trained on a dataset of Luganda proverbs with their English translations. The dataset consists of 3135 examples.
3
+
4
+ ## Data
5
+ **Train:** The training data consists of 3135 Luganda proverbs and their corresponding English translations.
6
+ **Eval:** The evaluation data is part of the training data and consists of informal sentences.
7
+
8
+ ## Model
9
+ **Architecture:** Seq2Seq
10
+ **Pretrained Model:** Helsinki-NLP/opus-mt-ug-en
11
+ **Fine-tuning:** The model was fine-tuned for 50 epochs with a learning rate of 2e-5.
12
+
13
+ ## Translation
14
+ **Source Language:** Luganda
15
+ **Target Language:** English
16
+ **Domain:** Informal sentences and proverbs
17
+
18
+ ## Usage
19
+ Here is an example of how to load and use the model for translation:
20
+
21
+ ```python
22
+ from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
23
+
24
+ model_name = 'your_model_name_on_hf_hub'
25
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
26
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
27
+
28
+ # Example input sentence in Luganda
29
+ input_sentence = 'Olutalo lwa nsi yonna lwazibwa omwaka oguwedde.'
30
+
31
+ inputs = tokenizer(input_sentence, return_tensors='pt')
32
+ outputs = model.generate(**inputs)
33
+ translation = tokenizer.decode(outputs[0], skip_special_tokens=True)
34
+ print(translation)
35
+ ```