Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -70,20 +70,20 @@ thresholds = []
|
|
70 |
|
71 |
with gr.Blocks() as demo:
|
72 |
with gr.Row():
|
73 |
-
gr.Markdown("#
|
74 |
with gr.Row():
|
75 |
-
video=gr.Video(label=u"
|
76 |
-
video2=gr.Video(label=u"Refaced
|
77 |
|
78 |
for i in range(0,num_faces):
|
79 |
-
with gr.Tab(u"
|
80 |
with gr.Row():
|
81 |
-
origin.append(gr.Image(label=u"
|
82 |
-
destination.append(gr.Image(label=u"
|
83 |
with gr.Row():
|
84 |
-
thresholds.append(gr.Slider(label=u"
|
85 |
with gr.Row():
|
86 |
-
button=gr.Button(u"
|
87 |
|
88 |
button.click(fn=run,inputs=[video]+origin+destination+thresholds,outputs=[video2])
|
89 |
|
|
|
70 |
|
71 |
with gr.Blocks() as demo:
|
72 |
with gr.Row():
|
73 |
+
gr.Markdown("# 🎃 FaceSwap Lite")
|
74 |
with gr.Row():
|
75 |
+
video=gr.Video(label=u"Original Video, foramt mp4",format="mp4")
|
76 |
+
video2=gr.Video(label=u"Refaced Video",interactive=False,format="mp4")
|
77 |
|
78 |
for i in range(0,num_faces):
|
79 |
+
with gr.Tab(u"Face #" + f"{i+1}"):
|
80 |
with gr.Row():
|
81 |
+
origin.append(gr.Image(label=u"The face we are replacing"))
|
82 |
+
destination.append(gr.Image(label=u"What do we replace it with?"))
|
83 |
with gr.Row():
|
84 |
+
thresholds.append(gr.Slider(label=u"Transparency",minimum=0.0,maximum=1.0,value=0.2))
|
85 |
with gr.Row():
|
86 |
+
button=gr.Button(u"⏳ Start processing", variant="primary")
|
87 |
|
88 |
button.click(fn=run,inputs=[video]+origin+destination+thresholds,outputs=[video2])
|
89 |
|