Views
No views yet
| Input | Output |
|---|---|
| She dont like going to the store. | She doesn't like going to the store. |
| He are moving here. | He is moving here. |
| I has went to the market yesterday. | I have gone to the market yesterday. |
| They was happy about they new house. | They were happy about their new house. |
1from transformers import T5Tokenizer, T5ForConditionalGeneration
2
3tokenizer = T5Tokenizer.from_pretrained("EnderAir/proximity")
4model = T5ForConditionalGeneration.from_pretrained("EnderAir/proximity")
5
6text = "grammar: He are moving here."
7inputs = tokenizer(text, return_tensors="pt")
8outputs = model.generate(**inputs, max_length=64, num_beams=5)
9print(tokenizer.decode(outputs[0], skip_special_tokens=True))
10# "He is moving here.""grammar: " — this is the T5 task prefix convention used during training.