idiomify / explore /explore_fetch_seq2seq_predict.py
eubinecto's picture
[#1] refactoring: Alpha -> Seq2Seq. We rely on git tags for versioning models.
64a6414
raw
history blame
458 Bytes
from transformers import BartTokenizer
from builders import SourcesBuilder
from fetchers import fetch_seq2seq
def main():
model = fetch_seq2seq("overfit")
tokenizer = BartTokenizer.from_pretrained("facebook/bart-base")
lit2idi = [
("my man", ""),
("hello", "")
] # just some dummy stuff
srcs = SourcesBuilder(tokenizer)(lit2idi)
out = model.predict(srcs=srcs)
print(out)
if __name__ == '__main__':
main()