Hi,
I’m trying to connect a Dataset object to a multimodal pipeline object and I’m not quite sure how to do this. With a simpler pipeline HF provides the KeyDataset helper, so you can do the following:
pipe(KeyDataset(data, “audio”))
but it’s not clear to me what to do when you want to pass two columns. For example, the tutorials (link attached) have the multi modal model:
vqa = pipeline(model=“impira/layoutlm-document-qa”)
vqa(
image=“invoice.png”,
question=“What is the invoice number?”,
)
but if I create a dataset object,
import pandas as pd
df = pd.DataFrame(data={‘image’: [
“invoice.png”
], ‘question’: [
“What is the invoice number?”
]})
data = Dataset.from_pandas(df)
vqa((data)
does not work. Any ideas how to connect these objects?