Commit c75a7046 authored by Administrator's avatar Administrator

增加产品图,修改prompt,分镜等

parent e9fb54f2
...@@ -222,4 +222,40 @@ export default { ...@@ -222,4 +222,40 @@ export default {
return Promise.reject(`与Test Api通讯失败`); return Promise.reject(`与Test Api通讯失败`);
}); });
}, },
submitImgToText(param: any): Promise<string> {
const post_data = param;
return request.post('/text2video/img2text', post_data)
.then((res: any) => {
// console.log(res);
if (res && res.code === 0) {
return res.data.result;
} else {
const errorMessage = res ? res.message : "未知错误";
return Promise.reject(errorMessage);
}
})
.catch((err: any) => {
console.log(`err = ${JSON.stringify(err)}`);
return Promise.reject(`与Img2Text Api通讯失败`);
});
},
submitImgTextMatch(param: any): Promise<any[]> {
const post_data = param;
return request.post('/text2video/img_text_match', post_data)
.then((res: any) => {
// console.log(res);
if (res && res.code === 0) {
return res.data.result;
} else {
const errorMessage = res ? res.message : "未知错误";
return Promise.reject(errorMessage);
}
})
.catch((err: any) => {
console.log(`err = ${JSON.stringify(err)}`);
return Promise.reject(`与ImgTextMatch Api通讯失败`);
});
},
} }
...@@ -64,7 +64,7 @@ export const useManyValues = () => { ...@@ -64,7 +64,7 @@ export const useManyValues = () => {
const horizontal_data = { const horizontal_data = {
task_id: "20240209114425596", task_id: "20240209114425596",
chatgpt_prompt: `生成一个50字的小故事`, chatgpt_prompt: `生成一个50字的小故事`,
chatgpt_answer: ``, chatgpt_answer: `在一个充满神秘色彩的森林里,活泼的绿衣少年,身着黄色配饰,眼神明亮如蓝宝石,手握小木棒,脸上洋溢着探索的喜悦。他的笑容温暖如阳光,身后是郁郁葱葱的树木,仿佛在邀请勇敢者踏足未知。一个小烟灰缸静静地躺在一旁,见证着他的每一次冒险。`,
chatgpt_answer_roles: [], chatgpt_answer_roles: [],
all_roles: "", all_roles: "",
adapt_result_json: [ adapt_result_json: [
...@@ -80,7 +80,8 @@ export const useManyValues = () => { ...@@ -80,7 +80,8 @@ export const useManyValues = () => {
"本镜配图": "http://wm-tools-backend.frp.wmdigit.com:8888/assets/outputs/20240209114425596/img/1_resized.png?v=20240321152031224", "本镜配图": "http://wm-tools-backend.frp.wmdigit.com:8888/assets/outputs/20240209114425596/img/1_resized.png?v=20240321152031224",
"local_image_path": "assets/outputs/20240209114425596/img/1_resized.png", "local_image_path": "assets/outputs/20240209114425596/img/1_resized.png",
"info": "", "info": "",
"roles": [] "roles": [],
"info2": "",
}, },
{ {
"编号": "2", "编号": "2",
...@@ -94,7 +95,8 @@ export const useManyValues = () => { ...@@ -94,7 +95,8 @@ export const useManyValues = () => {
"本镜配图": "http://wm-tools-backend.frp.wmdigit.com:8888/assets/outputs/20240209114425596/img/2_resized.png?v=20240321152034264", "本镜配图": "http://wm-tools-backend.frp.wmdigit.com:8888/assets/outputs/20240209114425596/img/2_resized.png?v=20240321152034264",
"local_image_path": "assets/outputs/20240209114425596/img/2_resized.png", "local_image_path": "assets/outputs/20240209114425596/img/2_resized.png",
"info": "", "info": "",
"roles": [] "roles": [],
"info2": "",
} }
], ],
final_video: ``, final_video: ``,
...@@ -137,7 +139,8 @@ export const useManyValues = () => { ...@@ -137,7 +139,8 @@ export const useManyValues = () => {
"本镜配图": "http://wm-tools-backend.frp.wmdigit.com:8888/assets/outputs/20240320160758713/img/1_resized.png?v=20240320160811071", "本镜配图": "http://wm-tools-backend.frp.wmdigit.com:8888/assets/outputs/20240320160758713/img/1_resized.png?v=20240320160811071",
"local_image_path": "assets/outputs/20240320160758713/img/1_resized.png", "local_image_path": "assets/outputs/20240320160758713/img/1_resized.png",
"info": "", "info": "",
"roles": [] "roles": [],
"info2": "",
} }
], ],
all_roles: "小松鼠, 大熊, 狐狸", all_roles: "小松鼠, 大熊, 狐狸",
......
This diff is collapsed.
This diff is collapsed.
...@@ -30,6 +30,7 @@ declare namespace Wm { ...@@ -30,6 +30,7 @@ declare namespace Wm {
"local_image_path": string, "local_image_path": string,
"info": string, "info": string,
"roles": String[], "roles": String[],
"info2": string,
} }
interface GenVideo { interface GenVideo {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment