shahzaibelbert commited on
Commit
cfdc169
·
1 Parent(s): 475ce5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -1,7 +1,14 @@
1
  import gradio as gr
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
 
5
 
 
 
 
 
6
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
  iface.launch()
 
1
  import gradio as gr
2
+ from transformers import pipeline
3
 
4
+ corrector = pipeline(
5
+ 'text2text-generation',
6
+ 'pszemraj/flan-t5-large-grammar-synthesis',
7
+ )
8
 
9
+ def grammar_check(text):
10
+ results = corrector(text)
11
+ print(results)
12
+ return results
13
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
14
  iface.launch()