yerang commited on
Commit
1d5eded
·
verified ·
1 Parent(s): 530f658

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -26
app.py CHANGED
@@ -186,25 +186,32 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
186
  with gr.Tabs():
187
  with gr.Tab("Text to LipSync"):
188
  gr.Markdown("# Text to LipSync")
 
 
189
  with gr.Row():
190
- with gr.Column():
191
- script_txt = gr.Text()
 
192
  # with gr.Column():
193
  # txt2video_gen_button = gr.Button("txt2video generation", variant="primary")
194
 
195
- with gr.Column():
196
- audio_gen_button = gr.Button("Audio generation", variant="primary")
197
  with gr.Row():
198
  output_audio = gr.Audio(label="Generated audio", type="filepath")
 
 
 
199
  with gr.Row():
200
  audio_path_component = gr.Textbox(label="Input", value="assets/examples/driving/test_aud.mp3")
201
  video_gen_button = gr.Button("Audio to Video generation", variant="primary")
202
  with gr.Row():
203
- a2v_output = gr.Video()
 
204
 
205
 
206
-
207
- gr.Markdown(load_description("assets/gradio_description_upload.md"))
208
  with gr.Row():
209
  with gr.Accordion(open=True, label="Source Portrait"):
210
  image_input = gr.Image(type="filepath")
@@ -242,7 +249,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
242
  flag_relative_input = gr.Checkbox(value=True, label="relative motion")
243
  flag_do_crop_input = gr.Checkbox(value=True, label="do crop")
244
  flag_remap_input = gr.Checkbox(value=True, label="paste-back")
245
- gr.Markdown(load_description("assets/gradio_description_animate_clear.md"))
246
  with gr.Row():
247
  with gr.Column():
248
  process_button_animation = gr.Button("🚀 Animate", variant="primary")
@@ -255,24 +262,24 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
255
  with gr.Column():
256
  with gr.Accordion(open=True, label="The animated video"):
257
  output_video_concat.render()
258
- with gr.Row():
259
- # Examples
260
- gr.Markdown("## You could also choose the examples below by one click ⬇️")
261
- with gr.Row():
262
- gr.Examples(
263
- examples=data_examples,
264
- fn=gpu_wrapped_execute_video,
265
- inputs=[
266
- image_input,
267
- video_input,
268
- flag_relative_input,
269
- flag_do_crop_input,
270
- flag_remap_input
271
- ],
272
- outputs=[output_image, output_image_paste_back],
273
- examples_per_page=6,
274
- cache_examples=False,
275
- )
276
 
277
  process_button_animation.click(
278
  fn=gpu_wrapped_execute_video,
 
186
  with gr.Tabs():
187
  with gr.Tab("Text to LipSync"):
188
  gr.Markdown("# Text to LipSync")
189
+
190
+ gr.Markdown("### 1. Text to audio")
191
  with gr.Row():
192
+ #with gr.Column():
193
+ script_txt = gr.Text()
194
+ audio_gen_button = gr.Button("Audio generation", variant="primary")
195
  # with gr.Column():
196
  # txt2video_gen_button = gr.Button("txt2video generation", variant="primary")
197
 
198
+ #with gr.Column():
199
+ #audio_gen_button = gr.Button("Audio generation", variant="primary")
200
  with gr.Row():
201
  output_audio = gr.Audio(label="Generated audio", type="filepath")
202
+
203
+
204
+ gr.Markdown("### 2. Audio to Driving-Video")
205
  with gr.Row():
206
  audio_path_component = gr.Textbox(label="Input", value="assets/examples/driving/test_aud.mp3")
207
  video_gen_button = gr.Button("Audio to Video generation", variant="primary")
208
  with gr.Row():
209
+ #a2v_output = gr.Video()
210
+ a2v_output.render()
211
 
212
 
213
+ gr.Markdown("### 3. Image to Talking Video")
214
+ #gr.Markdown(load_description("assets/gradio_description_upload.md"))
215
  with gr.Row():
216
  with gr.Accordion(open=True, label="Source Portrait"):
217
  image_input = gr.Image(type="filepath")
 
249
  flag_relative_input = gr.Checkbox(value=True, label="relative motion")
250
  flag_do_crop_input = gr.Checkbox(value=True, label="do crop")
251
  flag_remap_input = gr.Checkbox(value=True, label="paste-back")
252
+ #gr.Markdown(load_description("assets/gradio_description_animate_clear.md"))
253
  with gr.Row():
254
  with gr.Column():
255
  process_button_animation = gr.Button("🚀 Animate", variant="primary")
 
262
  with gr.Column():
263
  with gr.Accordion(open=True, label="The animated video"):
264
  output_video_concat.render()
265
+ # with gr.Row():
266
+ # # Examples
267
+ # gr.Markdown("## You could also choose the examples below by one click ⬇️")
268
+ # with gr.Row():
269
+ # gr.Examples(
270
+ # examples=data_examples,
271
+ # fn=gpu_wrapped_execute_video,
272
+ # inputs=[
273
+ # image_input,
274
+ # video_input,
275
+ # flag_relative_input,
276
+ # flag_do_crop_input,
277
+ # flag_remap_input
278
+ # ],
279
+ # outputs=[output_image, output_image_paste_back],
280
+ # examples_per_page=6,
281
+ # cache_examples=False,
282
+ # )
283
 
284
  process_button_animation.click(
285
  fn=gpu_wrapped_execute_video,