Skip to main content

Creating a model

A model requires some configuration to know what values it's supposed to predict. This is summarized in a field config, where we define the name of the fields and what type of values we expect them to be.

Let's pretend that we have some receipts and that we'd like to extract the total amount and date from them. We can create a field config file that looks something like this:

"total_amount": { "type": "amount", "maxLength": 20},
"date": { "type": "date", "maxLength": 10}

Next we'll use the field config to create an un-trained model:

las models create --name "Receipt model" --width 1281 --height 801 --field-config-path field_config.json

See models concepts for more information about field configs, and what the width and height parameters mean when creating a model.