Spaces:
Build error
Build error
File size: 1,305 Bytes
380c03c 636e13f 690a0e5 a564429 636e13f ba6d8c6 bf69a94 380c03c |
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 26 27 28 29 30 31 |
import subprocess, os
import shutil
def move_files_and_subdirs(source_dir):
# List all files and directories in the source directory
files_and_dirs = os.listdir(source_dir)
# Move each file and directory to the current working directory
for item in files_and_dirs:
# Get the full path of the item
src_path = os.path.join(source_dir, item)
# Check if it's a file
if os.path.isfile(src_path):
# Move the file to the current working directory
shutil.move(src_path, os.path.join(os.getcwd(), item))
elif os.path.isdir(src_path):
# Move the directory and its contents recursively to the current working directory
shutil.move(src_path, os.path.join(os.getcwd(), item))
else:
print(f"Ignoring: {src_path} as it is neither a file nor a directory")
subprocess.run(['git', 'clone', 'https://github.com/metavoiceio/metavoice-src', './mvsrc'])
subprocess.run(['sleep', '3'])
move_files_and_subdirs("mvsrc")
print(subprocess.run(['ls']))
# subprocess.run(['pip', 'install', '-r', 'requirements.txt'])
serving = subprocess.Popen(['python', 'fam/llm/serving.py', '--huggingface_repo_id', 'metavoiceio/metavoice-1B-v0.1'])
subprocess.run(['python', 'fam/ui/app.py'])
serving.communicate() |