Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -118,21 +118,25 @@ with gr.Blocks(theme=get_theme(), title="DeepFakeAI 1.0.0") as ui:
|
|
| 118 |
|
| 119 |
with gr.Box():
|
| 120 |
with gr.Column(scale=3):
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
unique_id = gr.Textbox(value=str(uuid.uuid4()), visible=False)
|
| 137 |
with gr.Tab("Image: "):
|
| 138 |
with gr.Row():
|
|
@@ -154,15 +158,18 @@ with gr.Blocks(theme=get_theme(), title="DeepFakeAI 1.0.0") as ui:
|
|
| 154 |
clear_button.click(fn=clear_output, inputs=unique_id)
|
| 155 |
|
| 156 |
with gr.Tab("Video: "):
|
| 157 |
-
|
| 158 |
-
|
|
|
|
|
|
|
|
|
|
| 159 |
with gr.Box():
|
| 160 |
skip_audio = gr.Checkbox(label="SKIP AUDIO")
|
| 161 |
keep_fps = gr.Checkbox(label="KEEP FPS")
|
| 162 |
keep_temp = gr.Checkbox(label="KEEP TEMP")
|
| 163 |
video_button = gr.Button("START")
|
| 164 |
clear_video_button = gr.ClearButton(value="CLEAR")
|
| 165 |
-
video_output = gr.Video(label="OUTPUT")
|
| 166 |
clear_video_button.add(video_output)
|
| 167 |
video_button.click(
|
| 168 |
run,
|
|
|
|
| 118 |
|
| 119 |
with gr.Box():
|
| 120 |
with gr.Column(scale=3):
|
| 121 |
+
with gr.Row():
|
| 122 |
+
with gr.Column():
|
| 123 |
+
face_analyser_direction_dropdown = gr.Dropdown(
|
| 124 |
+
label = 'FACE ANALYSER DIRECTION',
|
| 125 |
+
choices = ['left-right', 'right-left', 'top-bottom', 'bottom-top', 'small-large', 'large-small'],
|
| 126 |
+
value = 'left-right'
|
| 127 |
+
)
|
| 128 |
+
with gr.Column():
|
| 129 |
+
face_analyser_age_dropdown = gr.Dropdown(
|
| 130 |
+
label = 'FACE RECOGNITION',
|
| 131 |
+
choices = ['none'] + ['reference', 'many'],
|
| 132 |
+
value = 'reference'
|
| 133 |
+
)
|
| 134 |
+
with gr.Column():
|
| 135 |
+
face_analyser_gender_dropdown = gr.Dropdown(
|
| 136 |
+
label = 'FACE ANALYSER GENDER',
|
| 137 |
+
choices = ['none'] + ['male', 'female'],
|
| 138 |
+
value = 'none'
|
| 139 |
+
)
|
| 140 |
unique_id = gr.Textbox(value=str(uuid.uuid4()), visible=False)
|
| 141 |
with gr.Tab("Image: "):
|
| 142 |
with gr.Row():
|
|
|
|
| 158 |
clear_button.click(fn=clear_output, inputs=unique_id)
|
| 159 |
|
| 160 |
with gr.Tab("Video: "):
|
| 161 |
+
with gr.Row():
|
| 162 |
+
with gr.Column():
|
| 163 |
+
source_image_video = gr.Image(type="filepath", label="SOURCE IMAGE")
|
| 164 |
+
with gr.Column():
|
| 165 |
+
target_video = gr.Video(label="TARGET VIDEO")
|
| 166 |
with gr.Box():
|
| 167 |
skip_audio = gr.Checkbox(label="SKIP AUDIO")
|
| 168 |
keep_fps = gr.Checkbox(label="KEEP FPS")
|
| 169 |
keep_temp = gr.Checkbox(label="KEEP TEMP")
|
| 170 |
video_button = gr.Button("START")
|
| 171 |
clear_video_button = gr.ClearButton(value="CLEAR")
|
| 172 |
+
video_output = gr.Video(elem_id="image_output", label="OUTPUT")
|
| 173 |
clear_video_button.add(video_output)
|
| 174 |
video_button.click(
|
| 175 |
run,
|