File size: 428 Bytes
3be6142 25e310b 3be6142 25e310b 3be6142 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from transformers import BartTokenizer
from idiomify.builders import SourcesBuilder
BATCH = [
("I could die at any moment", "I could kick the bucket at any moment"),
("Speak plainly", "Don't beat around the bush")
]
def main():
tokenizer = BartTokenizer.from_pretrained("facebook/bart-large")
builder = SourcesBuilder(tokenizer)
src = builder(BATCH)
print(src)
if __name__ == '__main__':
main()
|