Spaces:
Sleeping
Sleeping
Commit
•
c687a76
1
Parent(s):
fef0beb
Update app.py
Browse files
app.py
CHANGED
@@ -66,11 +66,11 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
66 |
image_input = gr.Image(type="filepath")
|
67 |
gr.Examples(
|
68 |
examples=[
|
69 |
-
[osp.join(
|
70 |
-
[osp.join(
|
71 |
-
[osp.join(
|
72 |
-
[osp.join(
|
73 |
-
[osp.join(
|
74 |
],
|
75 |
inputs=[image_input],
|
76 |
cache_examples=False,
|
@@ -112,6 +112,13 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
112 |
with gr.Row():
|
113 |
gr.Examples(
|
114 |
examples=data_examples,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
inputs=[
|
116 |
image_input,
|
117 |
video_input,
|
@@ -119,10 +126,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
119 |
flag_do_crop_input,
|
120 |
flag_remap_input
|
121 |
],
|
122 |
-
|
123 |
-
examples_per_page=5,
|
124 |
-
#cache_examples="lazy",
|
125 |
-
#fn=lambda *args: spaces.GPU()(gradio_pipeline.execute_video)(*args),
|
126 |
)
|
127 |
gr.Markdown(load_description("assets/gradio_description_retargeting.md"))
|
128 |
with gr.Row():
|
|
|
66 |
image_input = gr.Image(type="filepath")
|
67 |
gr.Examples(
|
68 |
examples=[
|
69 |
+
[osp.join(example_portrait_dir, "s9.jpg")],
|
70 |
+
[osp.join(example_portrait_dir, "s6.jpg")],
|
71 |
+
[osp.join(example_portrait_dir, "s10.jpg")],
|
72 |
+
[osp.join(example_portrait_dir, "s5.jpg")],
|
73 |
+
[osp.join(example_portrait_dir, "s7.jpg")],
|
74 |
],
|
75 |
inputs=[image_input],
|
76 |
cache_examples=False,
|
|
|
112 |
with gr.Row():
|
113 |
gr.Examples(
|
114 |
examples=data_examples,
|
115 |
+
fn=gradio_pipeline.prepare_retargeting,
|
116 |
+
inputs=image_input,
|
117 |
+
outputs=[eye_retargeting_slider, lip_retargeting_slider, retargeting_input_image],
|
118 |
+
examples_per_page=5,
|
119 |
+
cache_examples="lazy",
|
120 |
+
).then(
|
121 |
+
fn=lambda *args: spaces.GPU()(gradio_pipeline.execute_video)(*args),
|
122 |
inputs=[
|
123 |
image_input,
|
124 |
video_input,
|
|
|
126 |
flag_do_crop_input,
|
127 |
flag_remap_input
|
128 |
],
|
129 |
+
outputs=[output_image, output_image_paste_back],
|
|
|
|
|
|
|
130 |
)
|
131 |
gr.Markdown(load_description("assets/gradio_description_retargeting.md"))
|
132 |
with gr.Row():
|