BaşlayınÜcretsiz Başlayın

Document VQA with LayoutLM

From VQA with images to VQA with documents! In this exercise, you will use the layoutlm-document-qa model to determine the total amount of training hours provided to employees in the years 2012-2013 from this document image:

Newsletter from an ICT company

The dataset (dataset) has been loaded and the pipeline module (pipeline) has been imported.

Bu egzersiz

Multi-Modal Models with Hugging Face

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Load the pipeline using the 'document-question-answering' task and 'impira/layoutlm-document-qa' checkpoint.
  • Process the document in data point 61 of the test set from dataset with an appropriate prompt to find how many days of formal training were provided to employees in 2012-2013.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Load the document-question-answering pipeline with the pretrained model
pipe = ____

# Process datapoint 61 to find the amount of training days
result = ____(dataset["____"][61]["____"], "____")

print(result)
Kodu Düzenle ve Çalıştır