AItool commited on
Commit
c3918a0
·
verified ·
1 Parent(s): dfa5f02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,7 +34,7 @@ def oxford_polish(sentence: str, model_choice: str) -> str:
34
  polisher = get_pipeline(model_id)
35
 
36
  # Minimal prompt for FLAN-T5
37
- prompt = f"Correct the grammar and rewrite in formal British English: {sentence}"
38
  out = polisher(prompt,
39
  max_new_tokens=60,
40
  do_sample=False,
@@ -55,7 +55,7 @@ demo = gr.Interface(
55
  value="FLAN-T5-base (Google)",
56
  label="Choose Model")
57
  ],
58
- outputs=gr.Textbox(label="Oxford-style Correction"),
59
  title="Oxford Grammar Polisher",
60
  description="Compare Google’s official FLAN-T5 small and base models for grammar correction."
61
  )
 
34
  polisher = get_pipeline(model_id)
35
 
36
  # Minimal prompt for FLAN-T5
37
+ prompt = f"You are an English grammar corrector and teacher. Return the corrected version: {sentence}"
38
  out = polisher(prompt,
39
  max_new_tokens=60,
40
  do_sample=False,
 
55
  value="FLAN-T5-base (Google)",
56
  label="Choose Model")
57
  ],
58
+ outputs=gr.Textbox(label="Oxford-grammar Correction"),
59
  title="Oxford Grammar Polisher",
60
  description="Compare Google’s official FLAN-T5 small and base models for grammar correction."
61
  )