Spaces:
Runtime error
Runtime error
| #!/usr/bin/env python3 | |
| from roop import core | |
| if __name__ == '__main__': | |
| core.run() | |
| import gradio as gr | |
| import cv2 | |
| import numpy as np | |
| def face_swap(target_video, swap_image): | |
| # Your face swap logic here | |
| result_video_path = "path/to/result/video.mp4" | |
| return result_video_path | |
| iface = gr.Interface( | |
| fn=face_swap, | |
| inputs=[ | |
| gr.Video(label="Target Video", max_size=500*1024*1024), # 500 MB limit | |
| gr.Image(label="Swap Image", type="filepath", max_size=100*1024*1024) # 100 MB limit | |
| ], | |
| outputs=gr.Video(label="Result Video"), | |
| title="Face Swap", | |
| description="Upload a target video and a swap image to perform a face swap.", | |
| enable_api=True | |
| ) | |
| iface.launch(share=True) |