from transformers import AutoModelForSeq2SeqLM, AutoTokenizer import re # Path to your model's checkpoints model_checkpoint_path = "barbaroo/nllb_200_600M_fo_en" # Load the tokenizer and model tokenizer = AutoTokenizer.from_pretrained(model_checkpoint_path) model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint_path) def split_into_sentences(text): # This simple function splits text into sentences using regular expressions # that capture punctuation marks followed by space and a capital letter. sentences = re.split(r'(?