Browse Source

label-studio修改

dev-credits
fanshuai 10 months ago
parent
commit
4d85e5c1ef
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java
  2. +1
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/vo/LabelDatasetVersionVo.java

+ 2
- 2
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java View File

@@ -475,10 +475,10 @@ public class NewDatasetServiceImpl implements NewDatasetService {
// 获取label-studio数据流
Map<String, String> headers = new HashMap<String, String>();
headers.put("Authorization", "Token " + labelDatasetVersionVo.getToken());
InputStream inputStream = HttpUtils.getIntputStream(labelloaclUrl + "/api/projects/" + labelDatasetVersionVo.getProject_id() + "/export?exportType=" + labelDatasetVersionVo.getExportType(), headers);
InputStream inputStream = HttpUtils.getIntputStream(labelloaclUrl + "/api/projects/" + labelDatasetVersionVo.getProjectId() + "/export?exportType=" + labelDatasetVersionVo.getExportType(), headers);

// 2. 打包成zip包
String zipFileName = labelDatasetVersionVo.getProject_id() + ".zip";
String zipFileName = labelDatasetVersionVo.getName()+"_"+labelDatasetVersionVo.getVersion() + ".zip";
MultipartFile[] files = FileUtil.toMultipartFiles(inputStream, zipFileName);

// 3. 上传到minio


+ 1
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/vo/LabelDatasetVersionVo.java View File

@@ -10,7 +10,7 @@ import java.io.Serializable;
@Data
public class LabelDatasetVersionVo implements Serializable {
private String token;
private String project_id;
private String projectId;
private String exportType;

private Integer id;


Loading…
Cancel
Save