Skip to content

2.6.2

Compare
Choose a tag to compare
@xenova xenova released this 27 Sep 14:14
· 745 commits to main since this release

What's new?

📝 New task: Document Question Answering

Document Question Answering is the task of answering questions based on an image of a document. Document Question Answering models take a (document, question) pair as input and return an answer in natural language. Check out the docs for more info!

image

Example code
// npm i @xenova/transformers
import { pipeline } from '@xenova/transformers';

let image = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/invoice.png';
let question = 'What is the invoice number?';

// Create document question answering pipeline
let qa_pipeline = await pipeline('document-question-answering', 'Xenova/donut-base-finetuned-docvqa');

// Run the pipeline
let output = await qa_pipeline(image, question);
// [{ answer: 'us-001' }]

🤖 New models

  • Add support for DonutSwin models in #320
  • Add support for Blenderbot and BlenderbotSmall in #292
  • Add support for LongT5 models #316

💻 New example application

  • In-browser semantic image search in #326 (demo, code, tweet)

    semantic-image-search-client.mp4

🐛 Misc. improvements

  • Fixing more _call LSP errors + extra typings by @kungfooman in #304
  • Remove CustomCache requirement for example browser extension project in #325

Full Changelog: 2.6.1...2.6.2