Spaces:
Running
on
Zero
Running
on
Zero
update format and details
Browse files
app.py
CHANGED
@@ -66,12 +66,18 @@ def update(text: str):
|
|
66 |
return correct_text(text, checker, corrector)
|
67 |
|
68 |
with gr.Blocks() as demo:
|
69 |
-
gr.Markdown("<center
|
70 |
-
gr.Markdown("Enter the text you want to correct in the textbox below
|
|
|
|
|
|
|
|
|
71 |
with gr.Row():
|
72 |
-
inp = gr.Textbox(placeholder="PUT TEXT TO CHECK & CORRECT BROSKI", value="I wen to the store yesturday to bye some food. I needd milk, bread, and a few otter things. The store was really crowed and I had a hard time finding everyting I needed. I finaly made it to the check out line and payed for my stuff.")
|
73 |
-
out = gr.Textbox()
|
74 |
-
btn = gr.Button("Process
|
75 |
btn.click(fn=update, inputs=inp, outputs=out)
|
76 |
-
|
|
|
|
|
77 |
demo.launch()
|
|
|
66 |
return correct_text(text, checker, corrector)
|
67 |
|
68 |
with gr.Blocks() as demo:
|
69 |
+
gr.Markdown("# <center>Robust Grammar Correction with FLAN-T5</center>")
|
70 |
+
gr.Markdown("**Instructions:** Enter the text you want to correct in the textbox below (_text will be truncated to 4000 characters_). Click 'Process' to run.")
|
71 |
+
gr.Markdown("""Models:
|
72 |
+
- `textattack/roberta-base-CoLA` for grammar quality detection
|
73 |
+
- `pszemraj/flan-t5-large-grammar-synthesis` for grammar correction
|
74 |
+
""")
|
75 |
with gr.Row():
|
76 |
+
inp = gr.Textbox(label="input", placeholder="PUT TEXT TO CHECK & CORRECT BROSKI", value="I wen to the store yesturday to bye some food. I needd milk, bread, and a few otter things. The store was really crowed and I had a hard time finding everyting I needed. I finaly made it to the check out line and payed for my stuff.")
|
77 |
+
out = gr.Textbox(label="output", interactive=False)
|
78 |
+
btn = gr.Button("Process")
|
79 |
btn.click(fn=update, inputs=inp, outputs=out)
|
80 |
+
gr.Markdown("---")
|
81 |
+
gr.Markdown("- see the [model card](https://huggingface.co/pszemraj/flan-t5-large-grammar-synthesis) for more info")
|
82 |
+
gr.Markdown("- if experiencing long wait times, feel free to duplicate the space!")
|
83 |
demo.launch()
|