干燥机配套车间生产管理系统/云平台服务端
bsw215583320
2024-01-08 aa562d3b26d8b6de0f0fc0b842ba3894ebcf0945
jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryRealTimeDataController.java
@@ -95,6 +95,8 @@
            }
            InputStream inputStream = file.getInputStream();
            List<Classifications.Classification> predict = herbUtil.predict(inputStream);
            if(predict.size()>0) {
            Map<String, Double> collect = predict.stream().collect(Collectors.toMap(Classifications.Classification::getClassName, Classifications.Classification::getProbability));
@@ -112,6 +114,10 @@
                    collect(Collectors.toList());
            return Result.ok(collect1);
            } else {
                return Result.error("AI识别服务异常");
            }
        } catch (Exception e) {
            e.printStackTrace();
            return Result.error("AI识别服务异常");