Views
No views yet
bird is to crow) given a query (eg. mammal is to whale)
so that the query and the generated word pair form an analogy statement.1from transformers import pipeline
2
3pipe = pipeline('text2text-generation', model="relbert/flan-t5-large-analogy-permutation-domain")
4output = pipe("generate analogy: mammal is to whale")
5print(output)
6>>> [{'generated_text': 'bird is to crow'}]