Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- agentlans/high-quality-english-sentences
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
base_model:
|
| 8 |
+
- google-t5/t5-base
|
| 9 |
+
library_name: transformers
|
| 10 |
+
tags:
|
| 11 |
+
- Safetensors
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
This model is for typos in texts and it outputs corrected texts.
|
| 15 |
+
|
| 16 |
+
Example:
|
| 17 |
+
|
| 18 |
+
Text with Typos: **Z hztwgx tstcsf qf z ulooqfe osfuqb tzx uezx awej z ozewsbe vlfwby fsmqisfx.**
|
| 19 |
+
|
| 20 |
+
Corrected Text: **A family member or a support person may stay with a patient during recovery.**
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
Example Usage:
|
| 24 |
+
```py
|
| 25 |
+
#Load the model and tokenizer
|
| 26 |
+
text = "" #Text with typos here!
|
| 27 |
+
inputs = tokenizer(cipher_text, return_tensors="pt", padding=True, truncation=True, max_length=256).to(device)
|
| 28 |
+
outputs = model.generate(inputs["input_ids"], max_length=256)
|
| 29 |
+
corrected_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 30 |
+
```
|