Deploying the model in Flutter

At this point, we have our Firebase authentication application running along with ReCaptcha protection. Now, let's add the final layer of security that won't allow any malicious users to enter the application.

We already know that the model is hosted at the endpoint: http://34.67.126.237:8000/login. We will simply make an API call from within the application, passing in the email and password provided by the user, and get the result value from the model. The value will assist us in judging whether the login was malicious by using a threshold result value.

If the value is less than 0.20, the login will be considered malicious and the following message will be shown on the screen:

Let's now look at the steps ...

Get Mobile Deep Learning with TensorFlow Lite, ML Kit and Flutter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.