潘志宝
2024-11-11 31bd2c17088ec34072deabe106ff1d695c8b2b49
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictModelHandlerImpl.java
@@ -83,6 +83,11 @@
            //IAILMDK.run
//            HashMap<String, Object> modelResult = IAILMDK.run(newModelBean, param2Values);
            HashMap<String, Object> modelResult = DllUtils.run(newModelBean, param2Values, predictModel.getMpkprojectid());
            if(!modelResult.containsKey("status_code") || !modelResult.containsKey("result") || Integer.parseInt(modelResult.get("status_code").toString()) != 100) {
                throw new RuntimeException("模型结果异常:" + modelResult);
            }
            modelResult = (HashMap<String, Object>) modelResult.get("result");
            //打印结果
            JSONObject jsonObjResult = new JSONObject();
            jsonObjResult.put("result", modelResult);
@@ -135,7 +140,7 @@
        newModelBean.setParamsArray(paramsArray);
        HashMap<String, Object> dataMap = new HashMap<>();
        HashMap<String, String> models = new HashMap<>(1);
        models.put("paramFile", predictModel.getModelpath());
        models.put("model_path", predictModel.getModelpath());
        dataMap.put("models", models);
        newModelBean.setDataMap(dataMap);
        return newModelBean;