Spaces:
Build error
Build error
updated app
Browse files
app.py
CHANGED
@@ -217,9 +217,15 @@ with gr.Blocks() as demo:
|
|
217 |
with gr.Tab("Video Inference"):
|
218 |
with gr.Row():
|
219 |
source_img2 = gr.Image(type="pil", label="Source image", show_label=True)
|
220 |
-
driver_vid = gr.Video(label="Driver video", source="
|
221 |
video_output = gr.Image(label="Rendered GIF avatar")
|
222 |
video_button = gr.Button("Predict")
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
|
224 |
gr.Examples(
|
225 |
examples=[
|
@@ -234,5 +240,6 @@ with gr.Blocks() as demo:
|
|
234 |
|
235 |
image_button.click(image_inference, inputs=[source_img, driver_img], outputs=image_output)
|
236 |
video_button.click(video_inference, inputs=[source_img2, driver_vid], outputs=video_output)
|
|
|
237 |
|
238 |
demo.launch()
|
|
|
217 |
with gr.Tab("Video Inference"):
|
218 |
with gr.Row():
|
219 |
source_img2 = gr.Image(type="pil", label="Source image", show_label=True)
|
220 |
+
driver_vid = gr.Video(label="Driver video", source="upload")
|
221 |
video_output = gr.Image(label="Rendered GIF avatar")
|
222 |
video_button = gr.Button("Predict")
|
223 |
+
with gr.Tab("Webcam Inference"):
|
224 |
+
with gr.Row():
|
225 |
+
source_img3 = gr.Image(type="pil", label="Source image", show_label=True)
|
226 |
+
driver_cam = gr.Video(label="Driver video", source="webcam")
|
227 |
+
cam_output = gr.Image(label="Rendered GIF avatar")
|
228 |
+
cam_button = gr.Button("Predict")
|
229 |
|
230 |
gr.Examples(
|
231 |
examples=[
|
|
|
240 |
|
241 |
image_button.click(image_inference, inputs=[source_img, driver_img], outputs=image_output)
|
242 |
video_button.click(video_inference, inputs=[source_img2, driver_vid], outputs=video_output)
|
243 |
+
cam_button.click(video_inference, inputs=[source_img3, driver_cam], outputs=cam_output)
|
244 |
|
245 |
demo.launch()
|