Now we have seen that our trained model shows outstanding accuracy on both test and validation sets. So why don't we develop a UI that would help us make the thing easier? As outlined previously, we will develop a simple UI that will allow us to unload a sample image, and then we should be able to detect it through a simple button press. This part is pure Java, so I'm not going to discuss the details here.
If we run the PetClassifier.java class, it first loads our trained model and acts as the backend deployed the model. Then it calls the UI.java class to load the user interface, which looks as follows: