HubCloneHubClone
Tasks

Document Question Answering

Document question answering reads a scanned page or PDF and answers questions about its content.

Inputs

Input
Scanned invoice — question: What is the total?

Document Question Answering Model

Output

Output
  • $1,284.000.93
  • $1,184.000.04
  • $284.000.01

About Document Question Answering

Document question answering reads a scanned page or PDF and answers questions about its content. Browse document question answering models on HubClone to compare checkpoints, or open a Space to try one in the browser.

Use Cases

Invoice processing

Pull the total amount and due date from supplier invoices.

Form understanding

Answer questions about fields in scanned application forms.

Inference

The Transformers pipeline API runs document question answering models in a few lines. Replace <model-id> with any model listed on this page.

from transformers import pipeline

pipe = pipeline("document-question-answering", model="<model-id>")
pipe("fox.png")

Useful Resources

Want to dig deeper into the topic? Great! Here is a hand-picked list of resources we found helpful.

Documentation

  • Document Question Answering task guide
  • Pipelines reference

Notebooks

  • Fine-tuning a document question answering model