I am working on this demo. The input data is like this:
The model's code is the following:
model = ClassificationModel(
"layoutlm",
"microsoft/layoutlm-base-uncased",
num_labels=2,
use_cuda=True,
cuda_device = 0
)
predictions, raw_outputs = model.predict(['test data abc'])
but it returns this error:
File "/mnt/data/home/tvkhuong/Data/SOFT/anaconda3/envs/classify/lib/python3.7/site-packages/simpletransformers/classification/classification_model.py", line 1708, in load_and_cache_examples
example.label = self.args.labels_map[example.label]
AttributeError: 'list' object has no attribute 'label'
How can I correctly define the model inputs in order to get the predictions?
