Spaces:
Sleeping
Sleeping
File size: 779 Bytes
06b0774 2fb9769 06b0774 e69d0e3 2fb9769 06b0774 7389ed9 e69d0e3 7389ed9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import subprocess
import os
def setup_and_run():
try:
# Run the setup script
subprocess.run(['bash', 'setup.sh'], check=True)
# Change the working directory to V-Express
os.chdir('V-Express')
# Run the extract_kps_sequence_and_audio.py script from within the V-Express directory
result = subprocess.run(['python', 'extract_kps_sequence_and_audio.py'], capture_output=True, text=True)
# Change back to the original working directory
os.chdir('..')
return result.stdout + "\n" + result.stderr
except subprocess.CalledProcessError as e:
return f"An error occurred: {e}\n{e.output}"
if __name__ == "__main__":
output = setup_and_run()
print(output)
|