thaboe01 commited on
Commit
c99607a
1 Parent(s): 8f7536b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -5
README.md CHANGED
@@ -2,7 +2,7 @@
2
  library_name: transformers
3
  tags: []
4
  widget:
5
- - text: 'Please correct the following sentence: '
6
  example_title: Spelling Correction
7
  ---
8
 
@@ -68,7 +68,7 @@ from transformers import T5Tokenizer, T5ForConditionalGeneration
68
  tokenizer = T5Tokenizer.from_pretrained("thaboe01/t5-spelling-corrector-ndebele")
69
  model = T5ForConditionalGeneration.from_pretrained("thaboe01/t5-spelling-corrector-ndebele")
70
 
71
- input_text = "Please correct the following sentence: "
72
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids
73
 
74
  outputs = model.generate(input_ids)
@@ -89,7 +89,7 @@ from transformers import T5Tokenizer, T5ForConditionalGeneration
89
  tokenizer = T5Tokenizer.from_pretrained("thaboe01/t5-spelling-corrector-ndebele")
90
  model = T5ForConditionalGeneration.from_pretrained("thaboe01/t5-spelling-corrector-ndebele", device_map="auto")
91
 
92
- input_text = "Please correct the following sentence: "
93
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
94
 
95
  outputs = model.generate(input_ids)
@@ -113,7 +113,7 @@ from transformers import T5Tokenizer, T5ForConditionalGeneration
113
  tokenizer = T5Tokenizer.from_pretrained("thaboe01/t5-spelling-corrector-ndebele")
114
  model = T5ForConditionalGeneration.from_pretrained("thaboe01/t5-spelling-corrector-ndebele", device_map="auto", torch_dtype=torch.float16)
115
 
116
- input_text = "Please correct the following sentence: "
117
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
118
 
119
  outputs = model.generate(input_ids)
@@ -134,7 +134,7 @@ from transformers import T5Tokenizer, T5ForConditionalGeneration
134
  tokenizer = T5Tokenizer.from_pretrained("thaboe01/t5-spelling-corrector-ndebele")
135
  model = T5ForConditionalGeneration.from_pretrained("thaboe01/t5-spelling-corrector-ndebele", device_map="auto", load_in_8bit=True)
136
 
137
- input_text = "Please correct the following sentence: "
138
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
139
 
140
  outputs = model.generate(input_ids)
 
2
  library_name: transformers
3
  tags: []
4
  widget:
5
+ - text: 'Please correct the following sentence: ukuti yiles sivnmelwano'
6
  example_title: Spelling Correction
7
  ---
8
 
 
68
  tokenizer = T5Tokenizer.from_pretrained("thaboe01/t5-spelling-corrector-ndebele")
69
  model = T5ForConditionalGeneration.from_pretrained("thaboe01/t5-spelling-corrector-ndebele")
70
 
71
+ input_text = "Please correct the following sentence: ukuti yiles sivnmelwano"
72
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids
73
 
74
  outputs = model.generate(input_ids)
 
89
  tokenizer = T5Tokenizer.from_pretrained("thaboe01/t5-spelling-corrector-ndebele")
90
  model = T5ForConditionalGeneration.from_pretrained("thaboe01/t5-spelling-corrector-ndebele", device_map="auto")
91
 
92
+ input_text = "Please correct the following sentence: ukuti yiles sivnmelwano"
93
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
94
 
95
  outputs = model.generate(input_ids)
 
113
  tokenizer = T5Tokenizer.from_pretrained("thaboe01/t5-spelling-corrector-ndebele")
114
  model = T5ForConditionalGeneration.from_pretrained("thaboe01/t5-spelling-corrector-ndebele", device_map="auto", torch_dtype=torch.float16)
115
 
116
+ input_text = "Please correct the following sentence: ukuti yiles sivnmelwano"
117
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
118
 
119
  outputs = model.generate(input_ids)
 
134
  tokenizer = T5Tokenizer.from_pretrained("thaboe01/t5-spelling-corrector-ndebele")
135
  model = T5ForConditionalGeneration.from_pretrained("thaboe01/t5-spelling-corrector-ndebele", device_map="auto", load_in_8bit=True)
136
 
137
+ input_text = "Please correct the following sentence: ukuti yiles sivnmelwano"
138
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
139
 
140
  outputs = model.generate(input_ids)