Update app.py
Browse files
app.py
CHANGED
@@ -197,7 +197,7 @@ def correct_grammar_with_gpt(text):
|
|
197 |
gpt_model = pipeline("text-generation", model="gpt2") # Replace with a grammar correction model if available
|
198 |
|
199 |
# Generate a corrected version of the text
|
200 |
-
corrected_output = gpt_model(text, max_length=
|
201 |
|
202 |
return corrected_output.strip()
|
203 |
|
|
|
197 |
gpt_model = pipeline("text-generation", model="gpt2") # Replace with a grammar correction model if available
|
198 |
|
199 |
# Generate a corrected version of the text
|
200 |
+
corrected_output = gpt_model(text, max_length=50)[0]['generated_text']
|
201 |
|
202 |
return corrected_output.strip()
|
203 |
|