kevinwang676 commited on
Commit
0691758
1 Parent(s): 68fbfa8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -334,9 +334,9 @@ async def text_to_speech_edge(text, language_code):
334
 
335
  with gr.Blocks(title="ChatGLM2-6B-int4", theme=gr.themes.Soft(text_size="sm")) as demo:
336
  gr.HTML("<center>"
337
- "<h1>🥳💕🎶 - ChatGLM2 + 声音克隆:和你喜欢的角色畅所欲言吧!</h1>"
338
  "</center>")
339
- gr.Markdown("## <center>💡 - 第二代ChatGLM大语言模型 + FreeVC变声,为您打造独一无二的沉浸式对话体验,支持中英双语</center>")
340
  gr.Markdown("## <center>🌊 - 更多精彩应用,尽在[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>")
341
  gr.Markdown("### <center>⭐ - 如果您喜欢这个程序,欢迎给我的[Github项目](https://github.com/KevinWang676/ChatGLM2-Voice-Cloning)点赞支持!</center>")
342
 
@@ -519,14 +519,14 @@ with gr.Blocks(title="ChatGLM2-6B-int4", theme=gr.themes.Soft(text_size="sm")) a
519
  with gr.Tabs(elem_id="sadtalker_source_image"):
520
  with gr.TabItem('Source image'):
521
  with gr.Row():
522
- source_image = gr.Image(label="Source image", source="upload", type="filepath", elem_id="img2img_image").style(width=512)
523
 
524
 
525
  with gr.Tabs(elem_id="sadtalker_driven_audio"):
526
  with gr.TabItem('Driving Methods'):
527
 
528
  with gr.Row():
529
- driven_audio = gr.Audio(label="Input audio", source="upload", type="filepath")
530
  driven_audio_no = gr.Audio(label="Use IDLE mode, no audio is required", source="upload", type="filepath", visible=False)
531
 
532
  with gr.Column():
@@ -560,17 +560,17 @@ with gr.Blocks(title="ChatGLM2-6B-int4", theme=gr.themes.Soft(text_size="sm")) a
560
  preprocess_type = gr.Radio(['crop', 'resize','full', 'extcrop', 'extfull'], value='crop', label='preprocess', info="How to handle input image?", visible=False)
561
 
562
  with gr.Row():
563
- is_still_mode = gr.Checkbox(label="Still Mode (fewer head motion, works with preprocess `full`)", value=True)
564
  facerender = gr.Radio(['facevid2vid','pirender'], value='facevid2vid', label='facerender', info="which face render?", visible=False)
565
 
566
  with gr.Row():
567
- batch_size = gr.Slider(label="batch size in generation", step=1, maximum=10, value=2)
568
  enhancer = gr.Checkbox(label="GFPGAN as Face enhancer", value=True, visible=False)
569
 
570
- submit = gr.Button('Generate', elem_id="sadtalker_generate", variant='primary')
571
 
572
  with gr.Tabs(elem_id="sadtalker_genearted"):
573
- gen_video = gr.Video(label="Generated video", format="mp4").style(width=256)
574
 
575
 
576
 
@@ -596,7 +596,7 @@ with gr.Blocks(title="ChatGLM2-6B-int4", theme=gr.themes.Soft(text_size="sm")) a
596
  outputs=[gen_video]
597
  )
598
  gr.Markdown("### <center>注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用。</center>")
599
- gr.Markdown("<center>💡 - 如何使用此程序:输入您对ChatGLM的提问后,依次点击“开始和GLM2交流吧”、“生成对应的音频吧”、“开始AI声音克隆吧”三个按键即可;使用声音克隆功能时,请先上传一段您喜欢的音频</center>")
600
  gr.HTML('''
601
  <div class="footer">
602
  <p>🌊🏞️🎶 - 江水东流急,滔滔无尽声。 明·顾璘
 
334
 
335
  with gr.Blocks(title="ChatGLM2-6B-int4", theme=gr.themes.Soft(text_size="sm")) as demo:
336
  gr.HTML("<center>"
337
+ "<h1>🥳💕🎶 - ChatGLM2+声音克隆+动态视频:和你喜欢的角色畅所欲言吧!</h1>"
338
  "</center>")
339
+ gr.Markdown("## <center>💡 - 第二代ChatGLM大语言模型+FreeVC变声+SadTalker视频,为您打造独一无二的沉浸式对话体验,支持中英双语</center>")
340
  gr.Markdown("## <center>🌊 - 更多精彩应用,尽在[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>")
341
  gr.Markdown("### <center>⭐ - 如果您喜欢这个程序,欢迎给我的[Github项目](https://github.com/KevinWang676/ChatGLM2-Voice-Cloning)点赞支持!</center>")
342
 
 
519
  with gr.Tabs(elem_id="sadtalker_source_image"):
520
  with gr.TabItem('Source image'):
521
  with gr.Row():
522
+ source_image = gr.Image(label="请上传一张您喜欢角色的图片", source="upload", type="filepath", elem_id="img2img_image").style(width=512)
523
 
524
 
525
  with gr.Tabs(elem_id="sadtalker_driven_audio"):
526
  with gr.TabItem('Driving Methods'):
527
 
528
  with gr.Row():
529
+ driven_audio = audio_cloned
530
  driven_audio_no = gr.Audio(label="Use IDLE mode, no audio is required", source="upload", type="filepath", visible=False)
531
 
532
  with gr.Column():
 
560
  preprocess_type = gr.Radio(['crop', 'resize','full', 'extcrop', 'extfull'], value='crop', label='preprocess', info="How to handle input image?", visible=False)
561
 
562
  with gr.Row():
563
+ is_still_mode = gr.Checkbox(label="静态模式 (开启静态模式,角色的面部动作会减少;默认开启)", value=True)
564
  facerender = gr.Radio(['facevid2vid','pirender'], value='facevid2vid', label='facerender', info="which face render?", visible=False)
565
 
566
  with gr.Row():
567
+ batch_size = gr.Slider(label="Batch size (数值越大,生成速度越快;若显卡性能好,可增大数值)", step=1, maximum=32, value=2)
568
  enhancer = gr.Checkbox(label="GFPGAN as Face enhancer", value=True, visible=False)
569
 
570
+ submit = gr.Button('开始视频聊天吧', elem_id="sadtalker_generate", variant='primary')
571
 
572
  with gr.Tabs(elem_id="sadtalker_genearted"):
573
+ gen_video = gr.Video(label="为您生成的专属视频", format="mp4").style(width=256)
574
 
575
 
576
 
 
596
  outputs=[gen_video]
597
  )
598
  gr.Markdown("### <center>注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用。</center>")
599
+ gr.Markdown("<center>💡 - 如何使用此程序:输入您对ChatGLM的提问后,依次点击“开始和GLM2交流吧”、“生成对应的音频吧”、“开始AI声音克隆吧”、“开始视频聊天吧”三个按键即可;使用声音克隆功能时,请先上传一段您喜欢的音频</center>")
600
  gr.HTML('''
601
  <div class="footer">
602
  <p>🌊🏞️🎶 - 江水东流急,滔滔无尽声。 明·顾璘