exact_data2023/application/functions/errors.py
Maciej Ścigacz 6102ba8889 test deploy
2023-05-30 15:35:09 +02:00

12 lines
374 B
Python

from transformers import AutoTokenizer
from transformers import pipeline
# model = 'application/models/errors_model'
# tokenizer = AutoTokenizer.from_pretrained('application/tokenizers/errors_tokenizer')
def errors_correction(data):
pipe = pipeline("text2text-generation",model=model,tokenizer=tokenizer,max_length=2000)
result = pipe(data)
return result