spellcheck_model / test.py
Leonardo Yoshida
feat: add initial trained model and scripts
54f5ec9
raw
history blame contribute delete
350 Bytes
from happytransformer import HappyTextToText, TTSettings
input_text = input('Enter your mispelled text: ')
happy_tt = HappyTextToText('T5', load_path='.')
beam_settings = TTSettings(num_beams=5, min_length=1, max_length=100)
output_text_1 = happy_tt.generate_text(
f'grammar: {input_text}',
args=beam_settings,
)
print(output_text_1.text)