sandhyasinha655 commited on
Commit
898f827
·
verified ·
1 Parent(s): afffedb

Upload 3 files

Browse files
Files changed (3) hide show
  1. LICENSE +11 -0
  2. app.py +18 -0
  3. requirements.txt +8 -0
LICENSE ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2025
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+ ...
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from roop import run_face_swap
3
+
4
+ def swap(source_img, target_file):
5
+ output_path = run_face_swap(source_img, target_file)
6
+ return output_path
7
+
8
+ iface = gr.Interface(
9
+ fn=swap,
10
+ inputs=[
11
+ gr.Image(label="Upload Face Image (face.png)"),
12
+ gr.File(label="Upload Target Image/Video (target.jpg / target.mp4)")
13
+ ],
14
+ outputs=gr.Video(label="Swapped Output"),
15
+ title="AI Face Swap (Image + Video)",
16
+ description="Upload your face and a target (image or video) to get a realistic face swapped result. Powered by Roop."
17
+ )
18
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ gradio
2
+ opencv-python
3
+ moviepy
4
+ Pillow
5
+ tqdm
6
+ numpy==1.23.5
7
+ onnxruntime-gpu
8
+ insightface==0.7.3