Update app.py
Browse files
app.py
CHANGED
|
@@ -70,9 +70,9 @@ def polish(sentence: str, choice: str) -> str:
|
|
| 70 |
|
| 71 |
# --- Gradio UI ---
|
| 72 |
with gr.Blocks(title="English Grammar Polisher (CPU enabled)") as demo:
|
| 73 |
-
gr.Markdown("### English Grammar Polisher\nChoose
|
| 74 |
inp = gr.Textbox(lines=3, label="Input (English) E.g. She go tomorrow buy two bread.", placeholder="Type an English sentence to correct.")
|
| 75 |
-
choice = gr.Dropdown(choices=MODEL_OPTIONS, value="
|
| 76 |
btn = gr.Button("Oxford grammar polish")
|
| 77 |
out = gr.Textbox(label="Output")
|
| 78 |
btn.click(polish, inputs=[inp, choice], outputs=out)
|
|
|
|
| 70 |
|
| 71 |
# --- Gradio UI ---
|
| 72 |
with gr.Blocks(title="English Grammar Polisher (CPU enabled)") as demo:
|
| 73 |
+
gr.Markdown("### English Grammar Polisher\nChoose Helsinki-NLP or FLAN-T5 (Google).")
|
| 74 |
inp = gr.Textbox(lines=3, label="Input (English) E.g. She go tomorrow buy two bread.", placeholder="Type an English sentence to correct.")
|
| 75 |
+
choice = gr.Dropdown(choices=MODEL_OPTIONS, value="Helsinki-NLP", label="Method")
|
| 76 |
btn = gr.Button("Oxford grammar polish")
|
| 77 |
out = gr.Textbox(label="Output")
|
| 78 |
btn.click(polish, inputs=[inp, choice], outputs=out)
|