sandhyasinha655 commited on
Commit
a04bcf7
·
verified ·
1 Parent(s): cc214a4

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -28
app.py DELETED
@@ -1,28 +0,0 @@
1
- import gradio as gr
2
- import os
3
- from run import run_faceswap
4
-
5
- def process_face_swap(source_image, target_media):
6
- source_path = "face.png"
7
- target_path = "target"
8
-
9
- source_image.save(source_path)
10
- ext = os.path.splitext(target_media.name)[-1]
11
- target_path += ext
12
- target_media.save(target_path)
13
-
14
- output_path = run_faceswap(source_path, target_path)
15
- return output_path
16
-
17
- iface = gr.Interface(
18
- fn=process_face_swap,
19
- inputs=[
20
- gr.Image(label="Source Face (face.png)"),
21
- gr.File(label="Target Image or Video (.jpg/.mp4)")
22
- ],
23
- outputs=gr.File(label="Swapped Output"),
24
- title="Lightweight Roop Face Swap",
25
- description="Upload face.png and target image/video. Output will be result.jpg or result.mp4"
26
- )
27
-
28
- iface.launch()