eu-sts / README.md
asier-gutierrez's picture
Update README.md
8581867
metadata
language:
  - eu

Basque Semantic Textual Similarity Model

import transformers

if __name__ == '__main__':
    model = 'eu-sts'
    tokenizer = transformers.AutoTokenizer.from_pretrained(model)
    model = transformers.BertForSequenceClassification.from_pretrained(model)

    sentence_pairs = [("Nire ama etxera etorri da.", "Ama visitan etorri da etxera")]
    for sp in sentence_pairs:
        result = model(**tokenizer(*sp, return_tensors='pt'))
        print(sp, result.logits)