K00B404 commited on
Commit
e3d9cfa
·
verified ·
1 Parent(s): 1874053

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -69,13 +69,20 @@ class FaceSwapper:
69
  return 'output.mp4'
70
  else:
71
  return None
72
-
73
  iface = gr.Interface(
74
  fn=lambda image1, image2, alpha, num_frames: FaceSwapper().generate_morph(image1, image2, num_frames, alpha),
75
- inputs=["image", "image", "slider", "number"],
 
 
 
 
 
76
  outputs="video",
77
  title="Face Swapper",
78
- description="Swap faces between two images and generate a morph video"
 
 
79
  )
80
 
81
  iface.launch()
 
69
  return 'output.mp4'
70
  else:
71
  return None
72
+
73
  iface = gr.Interface(
74
  fn=lambda image1, image2, alpha, num_frames: FaceSwapper().generate_morph(image1, image2, num_frames, alpha),
75
+ inputs=[
76
+ gr.inputs.Image(type="filepath", label="Image 1", max_size=1024*1024), # 1MB limit
77
+ gr.inputs.Image(type="filepath", label="Image 2", max_size=1024*1024), # 1MB limit
78
+ "slider",
79
+ "number"
80
+ ],
81
  outputs="video",
82
  title="Face Swapper",
83
+ description="Swap faces between two images and generate a morph video",
84
+ debug=True, # enable debug
85
+ catch_exceptions=True, # catch exceptions and display error messages instead of restarting the app
86
  )
87
 
88
  iface.launch()