harlanhong commited on
Commit
1365072
1 Parent(s): 491daa7
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -42,17 +42,17 @@ def inference(img, video):
42
 
43
  img.save("temp/image.jpg", "JPEG")
44
  video.save('temp/video.mp4')
45
- os.system("python demo_dagan.py --source_image 'temp/image.jpg' --driving_video {} --output 'temp/rst.mp4'".format(video))
46
 
47
  return f'temp/rst.mp4'
48
 
49
  gr.Interface(
50
  inference,
51
  [
52
- gr.inputs.Image(type="pil", label="Source Image"),
53
  gr.inputs.Video(type='mp4',label="Driving Video"),
54
  ],
55
- gr.outputs.Video(type="mp4", label="Output"),
56
  title=title,
57
  description=description,
58
  article=article,
 
42
 
43
  img.save("temp/image.jpg", "JPEG")
44
  video.save('temp/video.mp4')
45
+ os.system("python demo_dagan.py --source_image 'temp/image.jpg' --driving_video 'temp/video.mp4/ --output 'temp/rst.mp4'")
46
 
47
  return f'temp/rst.mp4'
48
 
49
  gr.Interface(
50
  inference,
51
  [
52
+ gr.inputs.Image(type="filepath", label="Source Image"),
53
  gr.inputs.Video(type='mp4',label="Driving Video"),
54
  ],
55
+ gr.outputs.Video(type="mp4", label="Output Video"),
56
  title=title,
57
  description=description,
58
  article=article,