How it works...
In step 1 and step 2, we have persisted the model to reuse the model capabilities in API.
In step 3, an API method is created to accept user inputs and return the results from the image classifier.
In step 4, the URI mappings will accept client requests (GET/POST). A GET request will serve the home page at the very beginning. A POST request will serve the end user request for image classification.
In step 5, we added an API dependency to the pom.xml file. For demonstration purposes, we build the API JAR file and the JAR file is stored in the local Maven repository. For production, you need to submit your API (JAR file) in a private repository so that Maven can fetch it from there.
In step 6, we are calling the ImageClassifier ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access