Update app.py
Browse files
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"
|
| 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-
|
| 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 |
)
|