Jonny001 commited on
Commit
b9a5f9f
·
verified ·
1 Parent(s): 5d572bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -13
app.py CHANGED
@@ -66,19 +66,12 @@ def swap_face(source_file, target_file, doFaceEnhancer):
66
  app = gr.Blocks()
67
 
68
  with app:
69
- source_image = gr.Image(label="Source Image")
70
- target_image = gr.Image(label="Target Image")
71
- face_enhancer = gr.Checkbox(label="Apply Enhancer?", info="Face Enhancer")
72
- output_image = gr.Image(label="Output Image")
73
-
74
- swap_button = gr.Button("Swap Faces")
75
- swap_button.click(
76
  fn=swap_face,
77
- inputs=[source_image, target_image, face_enhancer],
78
- outputs=output_image,
 
 
79
  )
80
 
81
- app.launch(
82
- description="Sorry for the inconvenience. The model is currently running on the CPU, which might affect performance. We appreciate your understanding.",
83
- theme="NoCrypt/miku"
84
- )
 
66
  app = gr.Blocks()
67
 
68
  with app:
69
+ gr.Interface(
 
 
 
 
 
 
70
  fn=swap_face,
71
+ inputs=[gr.Image(label="Source Image"), gr.Image(label="Target Image"), gr.Checkbox(label="Apply Enhancer?", info="Face Enhancer")],
72
+ outputs=gr.Image(label="Output Image"),
73
+ description="Sorry for the inconvenience. The model is currently running on the CPU, which might affect performance. We appreciate your understanding.",
74
+ theme="NoCrypt/miku"
75
  )
76
 
77
+ app.launch()