Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def correct_text(text: str, checker, corrector, separator: str = " ") -> str:
|
|
61 |
|
62 |
return corrected_text
|
63 |
|
64 |
-
def update(text: str
|
65 |
text = text[:4000]
|
66 |
return correct_text(text, checker, corrector)
|
67 |
|
@@ -69,7 +69,7 @@ with gr.Blocks() as demo:
|
|
69 |
gr.Markdown("<center># Robust Grammar Correction with FLAN-T5</center>")
|
70 |
gr.Markdown("Enter the text you want to correct in the textbox below. The text will be truncated to 4000 characters. Then click Run to see the corrected text.")
|
71 |
with gr.Row():
|
72 |
-
inp = gr.Textbox(placeholder="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 Text")
|
75 |
btn.click(fn=update, inputs=inp, outputs=out)
|
|
|
61 |
|
62 |
return corrected_text
|
63 |
|
64 |
+
def update(text: str):
|
65 |
text = text[:4000]
|
66 |
return correct_text(text, checker, corrector)
|
67 |
|
|
|
69 |
gr.Markdown("<center># Robust Grammar Correction with FLAN-T5</center>")
|
70 |
gr.Markdown("Enter the text you want to correct in the textbox below. The text will be truncated to 4000 characters. Then click Run to see the corrected text.")
|
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 Text")
|
75 |
btn.click(fn=update, inputs=inp, outputs=out)
|