FAW-AI-APP / faceswap_tab.py
JarvisLabs's picture
Upload 12 files
34492bf verified
raw
history blame contribute delete
627 Bytes
import gradio as gr
from src.fal_api import fal_faceswap_api
def create_faceswap_tab():
with gr.TabItem("Face Swap",id="face_swap"):
with gr.Row():
with gr.Column():
fs_base_inp = gr.Image(label="Base Image")
with gr.Column():
face_image = gr.Image(label="Face Image")
with gr.Row():
face_btn = gr.Button("Process")
with gr.Row():
face_out = gr.Image(label="Output",type="filepath")
face_btn.click(fal_faceswap_api,inputs=[fs_base_inp,face_image],outputs=face_out)
return fs_base_inp,face_out