TASK:搭配

This commit is contained in:
shahaibo
2024-04-08 17:02:53 +08:00
parent 02a9ca6b73
commit d00810baf1
3 changed files with 39 additions and 22 deletions

View File

@@ -43,7 +43,7 @@ public class PythonService {
* @param ids
* @return
*/
public JSONObject attributeRecognition(List<String> pictureUrls,List<String> ids) {
public JSONObject attributeRecognition(List<String> pictureUrls,List<String> ids, List<String> category) {
//限流校验
AccessLimitUtils.validate("attributeRecognition", 20);
OkHttpClient client = new OkHttpClient().newBuilder()
@@ -58,6 +58,7 @@ public class PythonService {
content.put("upload_img_path", pictureUrls);
//识别图片id数组
content.put("upload_img_id", ids);
content.put("upload_img_category", category);
RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(content));
Request request = new Request.Builder()
.url(accessPythonIp + ":9993/api/attribute")