Spaces:
Runtime error
Runtime error
kevinwang676
commited on
Commit
·
c0a8792
1
Parent(s):
dd0bf0d
Update app.py
Browse files
app.py
CHANGED
@@ -319,7 +319,7 @@ with gr.Blocks(title="ChatGLM2-6B-int4", theme=gr.themes.Soft(text_size="sm")) a
|
|
319 |
gr.Markdown("## <center>💡 - 第二代ChatGLM大语言模型 + FreeVC变声,为您打造独一无二的沉浸式对话体验,支持中英双语</center>")
|
320 |
gr.Markdown("## <center>🌊 - 更多精彩应用,尽在[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>")
|
321 |
gr.Markdown("### <center>⭐ - 如果您喜欢这个程序,欢迎给我的[Github项目](https://github.com/KevinWang676/ChatGLM2-Voice-Cloning)点赞支持!</center>")
|
322 |
-
with gr.Tab("
|
323 |
with gr.Accordion("📒 相关信息", open=False):
|
324 |
_ = f""" ChatGLM2的可选参数信息:
|
325 |
* Low temperature: responses will be more deterministic and focused; High temperature: responses more creative.
|
@@ -493,33 +493,32 @@ with gr.Blocks(title="ChatGLM2-6B-int4", theme=gr.themes.Soft(text_size="sm")) a
|
|
493 |
)
|
494 |
# """
|
495 |
|
496 |
-
with gr.Tab("
|
497 |
with gr.Row().style(equal_height=False):
|
498 |
with gr.Column(variant='panel'):
|
499 |
with gr.Tabs(elem_id="sadtalker_source_image"):
|
500 |
-
with gr.TabItem('
|
501 |
with gr.Row():
|
502 |
-
source_image = gr.Image(label="
|
503 |
|
504 |
with gr.Tabs(elem_id="sadtalker_driven_audio"):
|
505 |
-
with gr.TabItem('
|
506 |
with gr.Column(variant='panel'):
|
507 |
-
driven_audio =
|
508 |
-
|
509 |
with gr.Column(variant='panel'):
|
510 |
with gr.Tabs(elem_id="sadtalker_checkbox"):
|
511 |
-
with gr.TabItem('
|
512 |
gr.Markdown("need help? please visit our [best practice page](https://github.com/OpenTalker/SadTalker/blob/main/docs/best_practice.md) for more detials")
|
513 |
with gr.Column(variant='panel'):
|
514 |
# width = gr.Slider(minimum=64, elem_id="img2img_width", maximum=2048, step=8, label="Manually Crop Width", value=512) # img2img_width
|
515 |
# height = gr.Slider(minimum=64, elem_id="img2img_height", maximum=2048, step=8, label="Manually Crop Height", value=512) # img2img_width
|
516 |
-
pose_style = gr.Slider(minimum=0, maximum=46, step=1, label="Pose style", value=0)
|
517 |
-
size_of_image = gr.Radio([256, 512], value=256, label='face model resolution', info="use 256/512 model?")
|
518 |
-
preprocess_type = gr.Radio(['crop', '
|
519 |
-
is_still_mode = gr.Checkbox(label="
|
520 |
-
batch_size = gr.Slider(label="
|
521 |
-
enhancer = gr.Checkbox(label="GFPGAN as Face enhancer")
|
522 |
-
submit = gr.Button('
|
523 |
|
524 |
with gr.Tabs(elem_id="sadtalker_genearted"):
|
525 |
gen_video = gr.Video(label="Generated video", format="mp4").style(width=256)
|
|
|
319 |
gr.Markdown("## <center>💡 - 第二代ChatGLM大语言模型 + FreeVC变声,为您打造独一无二的沉浸式对话体验,支持中英双语</center>")
|
320 |
gr.Markdown("## <center>🌊 - 更多精彩应用,尽在[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>")
|
321 |
gr.Markdown("### <center>⭐ - 如果您喜欢这个程序,欢迎给我的[Github项目](https://github.com/KevinWang676/ChatGLM2-Voice-Cloning)点赞支持!</center>")
|
322 |
+
with gr.Tab("🍻 - ChatGLM2聊天区"):
|
323 |
with gr.Accordion("📒 相关信息", open=False):
|
324 |
_ = f""" ChatGLM2的可选参数信息:
|
325 |
* Low temperature: responses will be more deterministic and focused; High temperature: responses more creative.
|
|
|
493 |
)
|
494 |
# """
|
495 |
|
496 |
+
with gr.Tab("📺 - 视频聊天区"):
|
497 |
with gr.Row().style(equal_height=False):
|
498 |
with gr.Column(variant='panel'):
|
499 |
with gr.Tabs(elem_id="sadtalker_source_image"):
|
500 |
+
with gr.TabItem('图片上传'):
|
501 |
with gr.Row():
|
502 |
+
source_image = gr.Image(label="请上传一张您喜欢角色的图片", source="upload", type="filepath", elem_id="img2img_image").style(width=512)
|
503 |
|
504 |
with gr.Tabs(elem_id="sadtalker_driven_audio"):
|
505 |
+
with gr.TabItem('💡您还可以将视频下载到本地'):
|
506 |
with gr.Column(variant='panel'):
|
507 |
+
driven_audio = audio_cloned
|
|
|
508 |
with gr.Column(variant='panel'):
|
509 |
with gr.Tabs(elem_id="sadtalker_checkbox"):
|
510 |
+
with gr.TabItem('视频设置'):
|
511 |
gr.Markdown("need help? please visit our [best practice page](https://github.com/OpenTalker/SadTalker/blob/main/docs/best_practice.md) for more detials")
|
512 |
with gr.Column(variant='panel'):
|
513 |
# width = gr.Slider(minimum=64, elem_id="img2img_width", maximum=2048, step=8, label="Manually Crop Width", value=512) # img2img_width
|
514 |
# height = gr.Slider(minimum=64, elem_id="img2img_height", maximum=2048, step=8, label="Manually Crop Height", value=512) # img2img_width
|
515 |
+
pose_style = gr.Slider(minimum=0, maximum=46, step=1, label="Pose style", value=0, visible=False)
|
516 |
+
size_of_image = gr.Radio([256, 512], value=256, label='face model resolution', info="use 256/512 model?", visible=False)
|
517 |
+
preprocess_type = gr.Radio(['crop', 'full'], value='crop', label='是否聚焦角色面部', info="crop:视频会聚焦角色面部;full:视频会显示图片全貌")
|
518 |
+
is_still_mode = gr.Checkbox(label="静态模式 (开启静态模式,角色的面部动作会减少;默认开启)", value=True)
|
519 |
+
batch_size = gr.Slider(label="Batch size (数值越大,生成速度越快;若显卡性能好,可增大数值)", step=1, maximum=32, value=2)
|
520 |
+
enhancer = gr.Checkbox(label="GFPGAN as Face enhancer", value=True, visible=False)
|
521 |
+
submit = gr.Button('开始视频聊天吧', elem_id="sadtalker_generate", variant='primary')
|
522 |
|
523 |
with gr.Tabs(elem_id="sadtalker_genearted"):
|
524 |
gen_video = gr.Video(label="Generated video", format="mp4").style(width=256)
|