exact_data2023/application/functions/errors.py

9 lines
268 B
Python
Raw Normal View History

2023-05-28 14:50:23 +02:00
from transformers import pipeline
2023-05-31 16:56:13 +02:00
pipe = pipeline("text2text-generation",model="szymonj/polish-simple-error-correction", tokenizer="szymonj/polish-simple-error-correction", max_length=2000)
2023-05-28 14:50:23 +02:00
def errors_correction(data):
result = pipe(data)
return result