asd
Browse files
app.py
CHANGED
@@ -228,6 +228,7 @@ def correct_grammar(text):
|
|
228 |
inputs = grammar_tokenizer(f'Fix grammatical errors in this sentence: {text}', return_tensors="pt").input_ids.to(device)
|
229 |
outputs = grammar_model.generate(inputs, max_length=256)
|
230 |
corrected_text = grammar_tokenizer.decode(outputs[0], skip_special_tokens=True)
|
|
|
231 |
return corrected_text
|
232 |
|
233 |
@spaces.GPU
|
|
|
228 |
inputs = grammar_tokenizer(f'Fix grammatical errors in this sentence: {text}', return_tensors="pt").input_ids.to(device)
|
229 |
outputs = grammar_model.generate(inputs, max_length=256)
|
230 |
corrected_text = grammar_tokenizer.decode(outputs[0], skip_special_tokens=True)
|
231 |
+
print(corrected_text)
|
232 |
return corrected_text
|
233 |
|
234 |
@spaces.GPU
|