Spaces:
Running
Running
harlanhong
commited on
Commit
•
79f1436
1
Parent(s):
9f99eb8
force
Browse files
app.py
CHANGED
@@ -32,16 +32,16 @@ def inference(img, video):
|
|
32 |
if not os.path.exists('temp'):
|
33 |
os.system('mkdir temp')
|
34 |
#### Resize the longer edge of the input image
|
35 |
-
os.system("ffmpeg -y -ss 00:00:00 -i {video} -to 00:00:08 -c copy temp/driving_video.mp4")
|
36 |
# driving_video = "video_input.mp4"
|
37 |
-
os.system("python demo_dagan.py --source_image {} --driving_video
|
38 |
return f'temp/rst.mp4'
|
39 |
|
40 |
gr.Interface(
|
41 |
inference,
|
42 |
[
|
43 |
gr.inputs.Image(type="filepath", label="Source Image"),
|
44 |
-
gr.inputs.Video(type='
|
45 |
],
|
46 |
gr.outputs.Video(type="mp4", label="Output Video"),
|
47 |
title=title,
|
|
|
32 |
if not os.path.exists('temp'):
|
33 |
os.system('mkdir temp')
|
34 |
#### Resize the longer edge of the input image
|
35 |
+
# os.system("ffmpeg -y -ss 00:00:00 -i {video} -to 00:00:08 -c copy temp/driving_video.mp4")
|
36 |
# driving_video = "video_input.mp4"
|
37 |
+
os.system("python demo_dagan.py --source_image {} --driving_video {} --output 'temp/rst.mp4'".format(img,video))
|
38 |
return f'temp/rst.mp4'
|
39 |
|
40 |
gr.Interface(
|
41 |
inference,
|
42 |
[
|
43 |
gr.inputs.Image(type="filepath", label="Source Image"),
|
44 |
+
gr.inputs.Video(type='filepath',label="Driving Video"),
|
45 |
],
|
46 |
gr.outputs.Video(type="mp4", label="Output Video"),
|
47 |
title=title,
|