1. Knowledge Base
  2. AI Blocks and Flows

How do I create an AI block?

Step-by-step guide on AI blocks

Creating your custom model is the bread and butter of what we do. Let's take a step-by-step look at all the different options you have.

You have two options on how to get started - either go with a template (a pre-trained model) or create your own AI block, trained on your data. If you're unsure, check out our pros and cons for each - we'll guide you through the Custom option here.

Creating the block

Click AI Blocks on the left menu, and then click the Create an AI Block button on the right-hand side:

This will give you the option of the type of model you wish to build. Make your selection by clicking on one of the options. We'll proceed in this guide by creating an Image Classifier.

Congratulations, you've created a Block! You will want to rename it so you can identify it easily within your account. 

rename new

Adding Learning Data

You might have noticed you are launched right into uploading data, and this is because the next step is feeding the model with some data to learn from.

Training an AI model is like teaching a baby new words - with enough examples and repetition, you teach them how to see the shapes, colors, and patterns that make up the object. Eventually, the brain builds enough of a model to be able to tell the difference between your labels. 

Click on the button to add data, or drag and drop into this upload space (not available with Text Classifiers). Most common file types should work depending on the type of classifier you are building, for example, you can upload JPGs, PNGs, and TIFF files to the image classifier. 

Note: If you are building a Text Classifier, you will have the option here to import a spreadsheet of your text and labels, or import data directly from an app such as Gmail.

drag and drop

Once your file is uploaded into the model, it will show a datagrid of what you uploaded, and will allow you to type your label directly on to the data. 

Tip: At 20 cat images per label, our block was only vaguely confident of the difference between cats and dogs. At 100 images per label, it was getting over 90% confidence. Adding more data and retraining is a great way to improve the performance of your AI block.

Training

Once you have created more than 2 labels and added more than 20 data points to each label, you can train your model.

If the Train button is not enabled, check that all your labels have at least 20 data points.

You'll see a large button to start training, and once you click it you will see a pop-up to confirm your action. You'll then see a progress bar as training commences.

new train method

This process could take anywhere up to 10 minutes, depending on the amount and type of data you have, and your internet connection. In case you're running into any problems, you can do quick troubleshooting yourself.

Testing

Once the training is finished, click into the Test area to get a performance score. This is the first indicator of how well your model performs in "real life".

testing new

Before you'll set your model up in an automated workflow, you can test it out either by uploading a file from your computer or copying a URL of a file.

You'll get a prediction and the confidence rate - this will give you a good indication of how your model behaves in different situations.

And by the way - Congrats! You now have a working AI block!

You now have a couple of different options here to make sure your model does exactly what you want it to do by: