Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,35 @@ def update_gallery(choice, paths, prefix):
|
|
47 |
|
48 |
with gr.Blocks() as app:
|
49 |
gr.Markdown("## 3DHM Demo🤸♂️")
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
with gr.Row():
|
52 |
# Output Panel
|
53 |
with gr.Column(scale=2):
|
@@ -85,33 +113,6 @@ with gr.Blocks() as app:
|
|
85 |
gr.Markdown("---")
|
86 |
gr.Markdown("## Select input image and motion.")
|
87 |
|
88 |
-
# Gallery
|
89 |
-
with gr.Row():
|
90 |
-
with gr.Column():
|
91 |
-
gr.Markdown("### Reference Images")
|
92 |
-
gallery_images = gr.Gallery(
|
93 |
-
value=create_gallery_items(image_paths, "Image"),
|
94 |
-
label="Preview Images",
|
95 |
-
show_label=True,
|
96 |
-
columns=4,
|
97 |
-
height=400,
|
98 |
-
interactive=False,
|
99 |
-
object_fit="contain",
|
100 |
-
preview=True
|
101 |
-
)
|
102 |
-
|
103 |
-
with gr.Column():
|
104 |
-
gr.Markdown("### Sources Videos")
|
105 |
-
gallery_videos = gr.Gallery(
|
106 |
-
value=create_gallery_items(video_paths, "Video"),
|
107 |
-
label="Preview Videos",
|
108 |
-
show_label=True,
|
109 |
-
columns=2,
|
110 |
-
height=400,
|
111 |
-
interactive=False,
|
112 |
-
object_fit="contain",
|
113 |
-
preview=True
|
114 |
-
)
|
115 |
|
116 |
def update_selection(img, vid):
|
117 |
if img and vid:
|
|
|
47 |
|
48 |
with gr.Blocks() as app:
|
49 |
gr.Markdown("## 3DHM Demo🤸♂️")
|
50 |
+
|
51 |
+
# Gallery
|
52 |
+
with gr.Row():
|
53 |
+
with gr.Column():
|
54 |
+
gr.Markdown("### Reference Images")
|
55 |
+
gallery_images = gr.Gallery(
|
56 |
+
value=create_gallery_items(image_paths, "Image"),
|
57 |
+
label="Preview Images",
|
58 |
+
show_label=True,
|
59 |
+
columns=4,
|
60 |
+
height=400,
|
61 |
+
interactive=False,
|
62 |
+
object_fit="contain",
|
63 |
+
preview=True
|
64 |
+
)
|
65 |
+
|
66 |
+
with gr.Column():
|
67 |
+
gr.Markdown("### Sources Videos")
|
68 |
+
gallery_videos = gr.Gallery(
|
69 |
+
value=create_gallery_items(video_paths, "Video"),
|
70 |
+
label="Preview Videos",
|
71 |
+
show_label=True,
|
72 |
+
columns=2,
|
73 |
+
height=400,
|
74 |
+
interactive=False,
|
75 |
+
object_fit="contain",
|
76 |
+
preview=True
|
77 |
+
)
|
78 |
+
|
79 |
with gr.Row():
|
80 |
# Output Panel
|
81 |
with gr.Column(scale=2):
|
|
|
113 |
gr.Markdown("---")
|
114 |
gr.Markdown("## Select input image and motion.")
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
def update_selection(img, vid):
|
118 |
if img and vid:
|