from transformers import pipeline
pipe = pipeline("text2text-generation",model="szymonj/polish-simple-error-correction", tokenizer="szymonj/polish-simple-error-correction", max_length=2000)
def errors_correction(data):
result = pipe(data)
return result