Update README.md
Browse files
README.md
CHANGED
@@ -22,7 +22,7 @@ ___
|
|
22 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
23 |
tokenizer = AutoTokenizer.from_pretrained("KES/ENG-TEC")
|
24 |
model = AutoModelForSeq2SeqLM.from_pretrained("KES/ENG-TEC")
|
25 |
-
text = "Where you going now?"
|
26 |
inputs = tokenizer("eng:"+text, truncation=True, return_tensors='pt')
|
27 |
output = model.generate(inputs['input_ids'], num_beams=4, max_length=512, early_stopping=True)
|
28 |
translation=tokenizer.batch_decode(output, skip_special_tokens=True)
|
|
|
22 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
23 |
tokenizer = AutoTokenizer.from_pretrained("KES/ENG-TEC")
|
24 |
model = AutoModelForSeq2SeqLM.from_pretrained("KES/ENG-TEC")
|
25 |
+
text = "Where are you going now?"
|
26 |
inputs = tokenizer("eng:"+text, truncation=True, return_tensors='pt')
|
27 |
output = model.generate(inputs['input_ids'], num_beams=4, max_length=512, early_stopping=True)
|
28 |
translation=tokenizer.batch_decode(output, skip_special_tokens=True)
|