Spaces:
Running
Running
Commit
·
8e78d10
1
Parent(s):
415a60d
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,9 +24,11 @@ def run(*args):
|
|
| 24 |
f"python run.py --execution-providers cuda -s {source} -t {target} -o {output} "
|
| 25 |
f"--frame-processors {selected_frame_processors} "
|
| 26 |
f"--face-analyser-direction {face_analyser_direction} "
|
| 27 |
-
f"--face-analyser-age {face_analyser_age} "
|
| 28 |
-
f"--face-analyser-gender {face_analyser_gender}"
|
| 29 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
if len(rest_args) > 4:
|
| 32 |
skip_audio = rest_args[4]
|
|
@@ -42,6 +44,7 @@ def run(*args):
|
|
| 42 |
try:
|
| 43 |
print("Started...", cmd)
|
| 44 |
sp.run(cmd, shell=True, capture_output=True, text=True).stdout
|
|
|
|
| 45 |
return output
|
| 46 |
except Exception as e:
|
| 47 |
return f"An error occurred: {str(e)}"
|
|
|
|
| 24 |
f"python run.py --execution-providers cuda -s {source} -t {target} -o {output} "
|
| 25 |
f"--frame-processors {selected_frame_processors} "
|
| 26 |
f"--face-analyser-direction {face_analyser_direction} "
|
|
|
|
|
|
|
| 27 |
)
|
| 28 |
+
if face_analyser_age != 'none':
|
| 29 |
+
cmd += f" --face-analyser-age {face_analyser_age}"
|
| 30 |
+
if face_analyser_gender != 'none':
|
| 31 |
+
cmd += f" --face-analyser-gender {face_analyser_gender}"
|
| 32 |
|
| 33 |
if len(rest_args) > 4:
|
| 34 |
skip_audio = rest_args[4]
|
|
|
|
| 44 |
try:
|
| 45 |
print("Started...", cmd)
|
| 46 |
sp.run(cmd, shell=True, capture_output=True, text=True).stdout
|
| 47 |
+
|
| 48 |
return output
|
| 49 |
except Exception as e:
|
| 50 |
return f"An error occurred: {str(e)}"
|