Model.java 文件源码

java
阅读 34 收藏 0 点赞 0 评论 0

项目:SKIL_Examples 作者:
public JSONObject addModel(String name, String fileLocation, int scale, String uri) {
    JSONObject model = new JSONObject();

    try {
        List<String> uriList = new ArrayList<String>();
        uriList.add(uri);

        model =
                Unirest.post(MessageFormat.format("http://{0}:{1}/deployment/{2}/model", host, port, deploymentID))
                        .header("accept", "application/json")
                        .header("Content-Type", "application/json")
                        .body(new JSONObject()
                                .put("name", name)
                                .put("modelType", "model")
                                .put("fileLocation", fileLocation)
                                .put("scale", scale)
                                .put("uri", uriList)
                                .toString())
                        .asJson()
                        .getBody().getObject();
    } catch (UnirestException e) {
        e.printStackTrace();
    }

    return model;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号