Add transformers.js example code

#6
by Xenova HF staff - opened

Output is the same as the python version:

[{'corpus_id': 3, 'score': 0.81190395, 'text': 'Natural organic skincare range for sensitive skin'}, {'corpus_id': 2, 'score': 0.42477316, 'text': 'Organic cotton baby clothes for sensitive skin'}, {'corpus_id': 6, 'score': 0.16142638, 'text': 'Sensitive skin-friendly facial cleansers and toners'}]

JS:

[
  {
    corpus_id: 3,
    score: 0.8119039535522461,
    text: 'Natural organic skincare range for sensitive skin'
  },
  {
    corpus_id: 2,
    score: 0.42477330565452576,
    text: 'Organic cotton baby clothes for sensitive skin'
  },
  {
    corpus_id: 6,
    score: 0.16142651438713074,
    text: 'Sensitive skin-friendly facial cleansers and toners'
  }
]
Jina AI org

LGTM

numb3r3 changed pull request status to merged

Sign up or log in to comment