jbochi commited on
Commit
04ed2a0
1 Parent(s): 252331d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -6
README.md CHANGED
@@ -23,14 +23,18 @@ on the wiki.en dataset from [oliverguhr/spelling](https://github.com/oliverguhr/
23
  This an experimental model that should be capable of fixing typos and punctuation.
24
 
25
  ```python
26
- from transformers import pipeline
27
- fix_spelling = pipeline(
28
  "text2text-generation",
29
  model="jbochi/flan-t5-base-spelling",
30
- prefix="proofread: "
31
  )
32
-
33
- print(fix_spelling("lets do a comparsion",max_length=100))
 
 
 
 
 
34
  ```
35
 
36
  ## Intended uses & limitations
@@ -39,7 +43,7 @@ Intented for research purposes.
39
 
40
  - It may produce artifacts.
41
  - It doesn't support languages other than English.
42
- - It was fine-tuned with a `max_length` of 100.
43
 
44
  ## Training and evaluation data
45
 
 
23
  This an experimental model that should be capable of fixing typos and punctuation.
24
 
25
  ```python
26
+ pipe = pipeline(
 
27
  "text2text-generation",
28
  model="jbochi/flan-t5-base-spelling",
29
+ token=access_token
30
  )
31
+
32
+ def fix_spelling(input_sentence):
33
+ output = pipe("proofread: " + input_sentence, max_length=100)
34
+ return output[0]['generated_text']
35
+
36
+ print(fix_spelling("lets do a comparsion"))
37
+ #lets do a comparison
38
  ```
39
 
40
  ## Intended uses & limitations
 
43
 
44
  - It may produce artifacts.
45
  - It doesn't support languages other than English.
46
+ - It was fine-tuned with a `max_length` of 100 tokens.
47
 
48
  ## Training and evaluation data
49