Merge branch 'dev/dev_xp' into dev/dev
This commit is contained in:
@@ -964,7 +964,8 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
|
||||
|
||||
String clothCategory = pythonService.getClothCategory(sketchPath, gender);
|
||||
|
||||
return new GenerateResultVO(generateDetail.getId(), minioUtil.getPreSignedUrl(sketchPath, CommonConstant.MINIO_IMAGE_EXPIRE_TIME), "Success", clothCategory);
|
||||
return new GenerateResultVO(generate.getUniqueId(), generateDetail.getId(),
|
||||
minioUtil.getPreSignedUrl(sketchPath, CommonConstant.MINIO_IMAGE_EXPIRE_TIME), "Success", clothCategory);
|
||||
}
|
||||
|
||||
public void doCreditsSubtract(Long accountId, CreditsEventsEnum event){
|
||||
|
||||
@@ -390,6 +390,18 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
toProductImageRecord.setUserLikeGroupId(userLikeGroupId);
|
||||
}
|
||||
|
||||
// 翻译
|
||||
String prompt = toProductImageDTO.getPrompt();
|
||||
StringBuilder sb = new StringBuilder("The best quality, masterpiece, real image.");
|
||||
if (!StringUtil.isNullOrEmpty(prompt)) {
|
||||
prompt = pythonService.promptTranslate(prompt);
|
||||
}
|
||||
|
||||
String[] words = prompt.split("\\s+");
|
||||
if (words.length > 200) {
|
||||
throw new BusinessException("Please keep your input text under 200 words. Thanks!");
|
||||
}
|
||||
|
||||
toProductImageRecord.setCreateTime(LocalDateTime.now());
|
||||
if (!StringUtils.isEmpty(toProductImageDTO.getPrompt())) {
|
||||
toProductImageRecord.setPrompt(toProductImageDTO.getPrompt());
|
||||
@@ -399,12 +411,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
List<ToProductImageResult> result = new ArrayList<>();
|
||||
|
||||
int i = 0;
|
||||
// 翻译
|
||||
String prompt = toProductImageDTO.getPrompt();
|
||||
StringBuilder sb = new StringBuilder("The best quality, masterpiece, real image.");
|
||||
if (!StringUtil.isNullOrEmpty(prompt)) {
|
||||
prompt = pythonService.promptTranslate(prompt);
|
||||
}
|
||||
|
||||
// else {
|
||||
// s = "best quality, masterpiece. detailed, high-res, simple background, studio photography, extremely detailed, updo, detailed face, face, close-up, HDR, UHD, 8K realistic, Highly detailed, simple background, Studio lighting";
|
||||
// }
|
||||
@@ -924,6 +931,20 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
toProductImageRecord.setUserLikeGroupId(userLikeGroupId);
|
||||
}
|
||||
|
||||
// 翻译
|
||||
String prompt = toProductImageDTO.getPrompt();
|
||||
String s = "";
|
||||
if (!StringUtil.isNullOrEmpty(prompt)) {
|
||||
s = pythonService.promptTranslate(prompt);
|
||||
}else {
|
||||
s = "Snow moutain, snowy day, natural light";
|
||||
}
|
||||
// 对输入文本进行长度限制
|
||||
String[] words = prompt.split("\\s+");
|
||||
if (words.length > 200) {
|
||||
throw new BusinessException("Please keep your input text under 200 words. Thanks!");
|
||||
}
|
||||
|
||||
toProductImageRecord.setCreateTime(LocalDateTime.now());
|
||||
if (!StringUtils.isEmpty(toProductImageDTO.getPrompt())) {
|
||||
toProductImageRecord.setPrompt(toProductImageDTO.getPrompt());
|
||||
@@ -933,14 +954,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
List<ToProductImageResult> result = new ArrayList<>();
|
||||
|
||||
int i = 0;
|
||||
// 翻译
|
||||
String prompt = toProductImageDTO.getPrompt();
|
||||
String s = "";
|
||||
if (!StringUtil.isNullOrEmpty(prompt)) {
|
||||
s = pythonService.promptTranslate(prompt);
|
||||
}else {
|
||||
s = "Snow moutain, snowy day, natural light";
|
||||
}
|
||||
|
||||
for (ToProductImageVO toProductImageVO : toProductImageDTO.getToProductImageVOList()) {
|
||||
String taskId = UUID.randomUUID() + "-" + i + "-" + userHolder.getId();
|
||||
i ++;
|
||||
|
||||
Reference in New Issue
Block a user