Spaces:
Build error
Build error
trim
Browse files- app.py +5 -1
- driving.mp4 +2 -2
- final.mp4 +3 -0
- gradio_queue.db +0 -0
- out.mp4 +2 -2
- result.mp4 +2 -2
app.py
CHANGED
@@ -81,6 +81,10 @@ def make_animation(
|
|
81 |
|
82 |
|
83 |
def inference(video, image):
|
|
|
|
|
|
|
|
|
84 |
source_image = imageio.imread(image)
|
85 |
reader = imageio.get_reader(video)
|
86 |
fps = reader.get_meta_data()["fps"]
|
@@ -114,7 +118,7 @@ def inference(video, image):
|
|
114 |
|
115 |
|
116 |
title = "First Order Motion Model"
|
117 |
-
description = "Gradio demo for First Order Motion Model. Read more at the links below."
|
118 |
article = "<p style='text-align: center'><a href='https://papers.nips.cc/paper/2019/file/31c0b36aef265d9221af80872ceb62f9-Paper.pdf' target='_blank'>First Order Motion Model for Image Animation</a> | <a href='https://github.com/AliaksandrSiarohin/first-order-model' target='_blank'>Github Repo</a></p>"
|
119 |
examples = [["bella_porch.mp4", "julien.png"]]
|
120 |
generator, kp_detector = load_checkpoints(
|
|
|
81 |
|
82 |
|
83 |
def inference(video, image):
|
84 |
+
# trim video to 8 seconds
|
85 |
+
cmd = f"ffmpeg -ss 00:00:00 -i {video} -to 00:00:08 -c copy {video}"
|
86 |
+
subprocess.run(cmd.split())
|
87 |
+
|
88 |
source_image = imageio.imread(image)
|
89 |
reader = imageio.get_reader(video)
|
90 |
fps = reader.get_meta_data()["fps"]
|
|
|
118 |
|
119 |
|
120 |
title = "First Order Motion Model"
|
121 |
+
description = "Gradio demo for First Order Motion Model. Read more at the links below. Upload a video file (cropped to face), a facial image and have fun :D"
|
122 |
article = "<p style='text-align: center'><a href='https://papers.nips.cc/paper/2019/file/31c0b36aef265d9221af80872ceb62f9-Paper.pdf' target='_blank'>First Order Motion Model for Image Animation</a> | <a href='https://github.com/AliaksandrSiarohin/first-order-model' target='_blank'>Github Repo</a></p>"
|
123 |
examples = [["bella_porch.mp4", "julien.png"]]
|
124 |
generator, kp_detector = load_checkpoints(
|
driving.mp4
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:576f879e7ebdb7d59a7a863c787d90181b8d4bedb9634e53906d517387e35746
|
3 |
+
size 82476
|
final.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:47a8a3fb310abd8aeca729c5753d1ffd0f9fa61f58a5021ab6586e953146eb0d
|
3 |
+
size 476793
|
gradio_queue.db
CHANGED
Binary files a/gradio_queue.db and b/gradio_queue.db differ
|
|
out.mp4
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ab1fe3f25e7f416ce50f636097bc7e791a72e635959601572b39201539d3992f
|
3 |
+
size 164497
|
result.mp4
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:05d7589e39b89f78046d653d269f06589ec5099dd85d5d4a6fa7a5fa9218b4e4
|
3 |
+
size 83944
|