1、sketchboard的生成条件添加gender
2、添加存储生成图片MD5值到数据库
This commit is contained in:
xupei
2023-11-02 10:55:25 +08:00
parent dbc8c7dcf5
commit 2524077768
5 changed files with 25 additions and 9 deletions

View File

@@ -2013,7 +2013,7 @@ public class PythonService {
throw new BusinessException("system error!");
}
public List<String> generateSketchOrPrint(Long userId, String url, String category, String text, int mode, String modelName) {
public List<String> generateSketchOrPrint(Long userId, String url, String category, String text, int mode, String modelName, String gender) {
//限流校验
AccessLimitUtils.validate("generateSketchOrPrint", 5);
OkHttpClient client = new OkHttpClient().newBuilder()
@@ -2030,6 +2030,7 @@ public class PythonService {
content.put("mode", mode);
content.put("str", text);
content.put("version", modelName);
content.put("gender", gender);
RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(content, SerializerFeature.WriteMapNullValue));
Request request = new Request.Builder()
// .url(accessPythonIp + ":2828/aida/diffusion")