dimalik
commited on
Commit
β’
e84d086
1
Parent(s):
4e1fe68
add more examples
Browse files
README.md
CHANGED
@@ -92,11 +92,21 @@ tokenizer = AutoTokenizer.from_pretrained(model_id)
|
|
92 |
|
93 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
94 |
|
95 |
-
|
|
|
96 |
|
97 |
inputs = tokenizer(prompt, return_tensors='pt')
|
98 |
|
99 |
outputs = model.generate(**inputs, max_new_tokens=20)
|
100 |
|
101 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
```
|
|
|
92 |
|
93 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
94 |
|
95 |
+
# English GEC
|
96 |
+
prompt = '### ε½δ»€:\nζη« γζζ³ηγ«γγ\n### ε
₯ε:\nI has small cat ,\n### εΊε:\n\n'
|
97 |
|
98 |
inputs = tokenizer(prompt, return_tensors='pt')
|
99 |
|
100 |
outputs = model.generate(**inputs, max_new_tokens=20)
|
101 |
|
102 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True)
|
103 |
+
|
104 |
+
# --> I have a small cat ,
|
105 |
+
|
106 |
+
# German GEC
|
107 |
+
|
108 |
+
prompt = '### ε½δ»€:\nζη« γζζ³ηγ«γγ\n### ε
₯ε:\nIch haben eines kleines Katze ,\n### εΊε:\n\n'
|
109 |
+
|
110 |
+
# ...
|
111 |
+
# --> Ich habe eine kleine Katze ,
|
112 |
```
|