Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
text2video-frontend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周成波
text2video-frontend
Commits
c75a7046
Commit
c75a7046
authored
Apr 18, 2024
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加产品图,修改prompt,分镜等
parent
e9fb54f2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
389 additions
and
77 deletions
+389
-77
text2videoService.ts
src/api/service/text2videoService.ts
+36
-0
useManyValues.ts
src/views/home/compositions/useManyValues.ts
+7
-4
index.vue
src/views/home/index.vue
+180
-19
index_en.vue
src/views/home/index_en.vue
+165
-54
lib.wm.api.d.ts
typings/types/wm/lib.wm.api.d.ts
+1
-0
No files found.
src/api/service/text2videoService.ts
View file @
c75a7046
...
...
@@ -222,4 +222,40 @@ export default {
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通讯失败`
);
});
},
}
src/views/home/compositions/useManyValues.ts
View file @
c75a7046
...
...
@@ -64,7 +64,7 @@ export const useManyValues = () => {
const
horizontal_data
=
{
task_id
:
"20240209114425596"
,
chatgpt_prompt
:
`生成一个50字的小故事`
,
chatgpt_answer
:
``
,
chatgpt_answer
:
`
在一个充满神秘色彩的森林里,活泼的绿衣少年,身着黄色配饰,眼神明亮如蓝宝石,手握小木棒,脸上洋溢着探索的喜悦。他的笑容温暖如阳光,身后是郁郁葱葱的树木,仿佛在邀请勇敢者踏足未知。一个小烟灰缸静静地躺在一旁,见证着他的每一次冒险。
`
,
chatgpt_answer_roles
:
[],
all_roles
:
""
,
adapt_result_json
:
[
...
...
@@ -80,7 +80,8 @@ export const useManyValues = () => {
"本镜配图"
:
"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"
,
"info"
:
""
,
"roles"
:
[]
"roles"
:
[],
"info2"
:
""
,
},
{
"编号"
:
"2"
,
...
...
@@ -94,7 +95,8 @@ export const useManyValues = () => {
"本镜配图"
:
"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"
,
"info"
:
""
,
"roles"
:
[]
"roles"
:
[],
"info2"
:
""
,
}
],
final_video
:
``
,
...
...
@@ -137,7 +139,8 @@ export const useManyValues = () => {
"本镜配图"
:
"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"
,
"info"
:
""
,
"roles"
:
[]
"roles"
:
[],
"info2"
:
""
,
}
],
all_roles
:
"小松鼠, 大熊, 狐狸"
,
...
...
src/views/home/index.vue
View file @
c75a7046
This diff is collapsed.
Click to expand it.
src/views/home/index_en.vue
View file @
c75a7046
This diff is collapsed.
Click to expand it.
typings/types/wm/lib.wm.api.d.ts
View file @
c75a7046
...
...
@@ -30,6 +30,7 @@ declare namespace Wm {
"local_image_path"
:
string
,
"info"
:
string
,
"roles"
:
String
[],
"info2"
:
string
,
}
interface
GenVideo
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment