anegda commited on
Commit
2527b5a
1 Parent(s): 8f0cbcd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -3
README.md CHANGED
@@ -1,3 +1,41 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - es
5
+ - eu
6
+ metrics:
7
+ - BLEU
8
+ - TER
9
+ ---
10
+ ## Medical Spanish-Basque machine translation model
11
+
12
+ ## Model description
13
+
14
+ - **Model type:** translation
15
+ - **Source Language:** Spanish
16
+ - **Target Language:** Basque
17
+ - **License:** apache-2.0
18
+
19
+ ## How to Get Started with the Model
20
+
21
+ Use the code below to get started with the model.
22
+
23
+ ```
24
+ from transformers import MarianMTModel, MarianTokenizer
25
+ from transformers import AutoTokenizer
26
+ from transformers import AutoModelForSeq2SeqLM
27
+
28
+ src_text = ["El paciente tiene daño cerebral"]
29
+
30
+ model_name = "anegda/medical_es-eu"
31
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
32
+
33
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
34
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
35
+ print([tokenizer.decode(t, skip_special_tokens=True) for t in translated])`
36
+ ```
37
+
38
+ The recommended environments include the following transfomer versions: 4.12.3 , 4.15.0 , 4.26.1
39
+
40
+ ### Contact information
41
+ For further information, send an email to <[email protected]>