5 Minute AI Model Deployment on DIY Platforms
Published: 2019-08-20 00:04:54

<h3>Background</h3>
While deploying AI models has often proven to be a reasonable
challenge, DIY platforms are changing the rules of the game with
deployment made both easy and swift, even for the relatively
inexperienced.
For most developers, AI model development seems like a nice touch, but the real challenge begins when they need to create and deploy the models.
<ul>The pain points faced along the way include:

<li>Understanding feature engineering</li>
<li>Understanding the mathematics behind machine learning models and choosing the correct models</li>
<li>Designing an interface to access predictive features of AI models</li>
<li>Implementing an infrastructure to serve the AI models on a cloud or self hosted platform</li>
</ul>
As you can see above, these skills require a team of engineers and DevOps which large corporations can afford to hire.
By democratizing AI building, SuperAI creates an enormous value where anyone with meaningful data is able to generate a model and start integrating it back into their application.

<h3>How it’s done</h3>

1. Access <a href="https://www.superai.io/?marid=NeG2Cv" target="_blank">SuperAI</a>, an AI platform that simplifies model building and deployment.

2. Signup and create a project. I selected a use case, "Document Classifier". Document classification is to predict the categories from sentences.
<img src="https://thepracticaldev.s3.amazonaws.com/i/hpyv4653qh60gom2u9bh.png"/>

3. While following the instructions on data preparation, I drag-and-dropped the file to upload. It seems to not work if I don't follow the instructions as it is..
<img src="https://thepracticaldev.s3.amazonaws.com/i/q80w7064urwg19q1ox9c.png"/>

4. There were some warnings on the data; the platform asks me to choose the target column. The target column is what we want to predict the outcome of. In this case, I want to predict the sentiment so, I chose "sentiment" as the target column and the warning is gone.
<img src="https://thepracticaldev.s3.amazonaws.com/i/qk8gda5qm9ljj6hxcn0r.png"/>

5. Now I click the "Train" tab and I can train a model. I've selected 5 minutes as training time but this can be shorter or longer depending on the data size and complexity.
<img src="https://thepracticaldev.s3.amazonaws.com/i/w743982s8e9ccqvaldfy.png"/>

6. After 5 minutes, I was able to get a model here at 94.75% accuracy. That seems good enough for my application.
<img src="https://thepracticaldev.s3.amazonaws.com/i/rhglty11hnu2lqohh4zz.png"/>

7. Now, I want to deploy this model so I click "Stage" with "Deploy" checked
<img src="https://thepracticaldev.s3.amazonaws.com/i/jeo88rke894t8drhyo06.png"/>

8. After some time, it seems deployed
<img src="https://thepracticaldev.s3.amazonaws.com/i/7mxvx5adstzimux2jii9.png"/>

9. Now I go to "Predict" tab and test that it's working. I entered a sentence to predict then I was able to get the categorized outcomes with their confidence level.
<img src="https://thepracticaldev.s3.amazonaws.com/i/ew1a961shwmo5m8itcys.png"/>

10. Then I generated the API key and tested in Terminal to verify the results
<img src="https://thepracticaldev.s3.amazonaws.com/i/t3dgou9r2ju2pcu44jw8.png"/>

Great! Now I can integrate this back into my application
It seems like the tip is to understand your data and format it in a way that they accept it. If the data does not make sense, you would expect a model with bad accuracy. If the data is not formatted correctly, it does not seem to parse well.

<h3>Conclusion</h3>

<a href="https://www.superai.io/?marid=NeG2Cv" target="_blank">DIY AI platforms</a> are changing the rules of the game as far as outputting an AI model relatively good and very quickly.
As long as you understand your data, the rest of the pipeline is quite straightforward. I hope this DIY AI platform improves so that it can handle more use cases and wider range of data formats.

Thanks for reading,