djl-object-detection-inference-docker-lambda/src/main/java/com/example/App.java [29:45]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class App implements RequestStreamHandler {

    private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();

    static {
        // DJL saves model and native libraries in cache folder.
        // In AWS-Lambda only /tmp folder is writable.
        System.setProperty("DJL_CACHE_DIR", "/tmp/djl_cache");
    }

    public void handleRequest(InputStream is, OutputStream os, Context context) throws IOException {
        LambdaLogger logger = context.getLogger();
        String input = Utils.toString(is);

        Request request = GSON.fromJson(input, Request.class);
        String inputImageUrl = request.getInputImageUrl();
        logger.log("inputImageUrl: " + inputImageUrl);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



djl-tensorflow-lite-inference-docker-lambda/src/main/java/com/example/App.java [27:43]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class App implements RequestStreamHandler {

    private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();

    static {
        // DJL saves model and native libraries in cache folder.
        // In AWS-Lambda only /tmp folder is writable.
        System.setProperty("DJL_CACHE_DIR", "/tmp/djl_cache");
    }

    public void handleRequest(InputStream is, OutputStream os, Context context) throws IOException {
        LambdaLogger logger = context.getLogger();
        String input = Utils.toString(is);

        Request request = GSON.fromJson(input, Request.class);
        String inputImageUrl = request.getInputImageUrl();
        logger.log("inputImageUrl: " + inputImageUrl);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



