AItool commited on
Commit
9a6a0e2
·
verified ·
1 Parent(s): 0176ebb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 FLAN-T5 (Google) or OPUS-MT (Helsinki-NLP).")
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="FLAN-T5-base (Google)", label="Method")
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)