itserphan commited on
Commit
cf6f92c
·
verified ·
1 Parent(s): f32f85d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -18,14 +18,6 @@ def correct_text(text):
18
  corrected_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
19
  return corrected_text
20
 
21
- examples = [
22
- ["i went to the park yesterday it was fun"],
23
- ["She go to school every day by bus."],
24
- ["The dogs runs in the yard."],
25
- ["He bought apple from the market."],
26
- ["Beautiful very the garden is."],
27
- ["I don’t know where is she."]
28
- ]
29
 
30
  demo = gr.Interface(
31
  fn=correct_text,
@@ -33,7 +25,13 @@ demo = gr.Interface(
33
  outputs=gr.Textbox(label="Corrected Sentence"),
34
  title="Grammar Correction with T5-small",
35
  description="This model automatically corrects grammar mistakes in English sentences. Trained on the Lang-8 dataset.",
36
- examples=examples
 
 
 
 
 
 
37
  )
38
 
39
  if __name__ == "__main__":
 
18
  corrected_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
19
  return corrected_text
20
 
 
 
 
 
 
 
 
 
21
 
22
  demo = gr.Interface(
23
  fn=correct_text,
 
25
  outputs=gr.Textbox(label="Corrected Sentence"),
26
  title="Grammar Correction with T5-small",
27
  description="This model automatically corrects grammar mistakes in English sentences. Trained on the Lang-8 dataset.",
28
+ examples= [
29
+ ["i went to the park yesterday it was fun"],
30
+ ["She go to school every day by bus."],
31
+ ["The dogs runs in the yard."],
32
+ ["He bought apple from the market."],
33
+ ["Beautiful very the garden is."],
34
+ ["I don’t know where is she."]]
35
  )
36
 
37
  if __name__ == "__main__":