Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -17,8 +17,8 @@ from PIL import Image
17
 
18
  def swap_face(source_file, target_file,doFaceEnhancer):
19
 
20
- source_path = "input.jpg"
21
- target_path = "target.jpg"
22
 
23
  source_image = Image.fromarray(source_file)
24
  source_image.save(source_path)
@@ -30,7 +30,7 @@ def swap_face(source_file, target_file,doFaceEnhancer):
30
 
31
  roop.globals.source_path = source_path
32
  roop.globals.target_path = target_path
33
- output_path = "output.jpg"
34
  roop.globals.output_path = normalize_output_path(
35
  roop.globals.source_path, roop.globals.target_path, output_path
36
  )
@@ -67,6 +67,6 @@ def swap_face(source_file, target_file,doFaceEnhancer):
67
 
68
 
69
  app = gr.Interface(
70
- fn=swap_face, inputs=[gr.Image(), gr.Image(),gr.Checkbox(label="face_enhancer?", info="do face enhancer?")], outputs="image"
71
  )
72
  app.launch()
 
17
 
18
  def swap_face(source_file, target_file,doFaceEnhancer):
19
 
20
+ source_path = "input.mp4"
21
+ target_path = "target.mp4"
22
 
23
  source_image = Image.fromarray(source_file)
24
  source_image.save(source_path)
 
30
 
31
  roop.globals.source_path = source_path
32
  roop.globals.target_path = target_path
33
+ output_path = "output.mp4"
34
  roop.globals.output_path = normalize_output_path(
35
  roop.globals.source_path, roop.globals.target_path, output_path
36
  )
 
67
 
68
 
69
  app = gr.Interface(
70
+ fn=swap_face, inputs=[gr.Video(), gr.Video(),gr.Checkbox(label="face_enhancer?", info="do face enhancer?")], outputs="image"
71
  )
72
  app.launch()