SnJForever commited on
Commit
504ac19
1 Parent(s): 52b65a1

add talk_head

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -440,6 +440,8 @@ class ChatWrapper:
440
  html_video = create_html_video(temp_file, TALKING_HEAD_WIDTH)
441
  html_audio, temp_aud_file = do_html_audio_speak_azure(output, translate_to)
442
  else:
 
 
443
  html_audio, temp_aud_file = do_html_audio_speak_azure(output, translate_to)
444
  else:
445
  if talking_head:
@@ -680,7 +682,7 @@ with gr.Blocks(css=".gradio-container {background-color: lightgray}") as block:
680
  tools_list_state = gr.State(TOOLS_DEFAULT_LIST)
681
  trace_chain_state = gr.State(False)
682
  speak_text_state = gr.State(True)
683
- talking_head_state = gr.State(False)
684
  monologue_state = gr.State(False) # Takes the input and repeats it back to the user, optionally transforming it.
685
  force_translate_state = gr.State(FORCE_TRANSLATE_DEFAULT) #
686
  memory_state = gr.State()
 
440
  html_video = create_html_video(temp_file, TALKING_HEAD_WIDTH)
441
  html_audio, temp_aud_file = do_html_audio_speak_azure(output, translate_to)
442
  else:
443
+ temp_file = LOOPING_TALKING_HEAD
444
+ html_video = create_html_video(temp_file, TALKING_HEAD_WIDTH)
445
  html_audio, temp_aud_file = do_html_audio_speak_azure(output, translate_to)
446
  else:
447
  if talking_head:
 
682
  tools_list_state = gr.State(TOOLS_DEFAULT_LIST)
683
  trace_chain_state = gr.State(False)
684
  speak_text_state = gr.State(True)
685
+ talking_head_state = gr.State(True)
686
  monologue_state = gr.State(False) # Takes the input and repeats it back to the user, optionally transforming it.
687
  force_translate_state = gr.State(FORCE_TRANSLATE_DEFAULT) #
688
  memory_state = gr.State()