Spaces:
Running
Running
Update script.py
Browse files
script.py
CHANGED
@@ -71,8 +71,9 @@ def run_training(hf_dataset_path: str):
|
|
71 |
dataset_dir = process_dataset(dataset_dir)
|
72 |
|
73 |
# run training
|
74 |
-
|
75 |
-
|
|
|
76 |
|
77 |
commands = f"python run.py {os.path.join(dataset_dir, 'config.yaml')}"
|
78 |
process = subprocess.Popen(commands, shell=True, cwd="ai-toolkit", env=os.environ)
|
|
|
71 |
dataset_dir = process_dataset(dataset_dir)
|
72 |
|
73 |
# run training
|
74 |
+
if not os.path.exists("ai-toolkit"):
|
75 |
+
commands = "git clone https://github.com/ostris/ai-toolkit.git ai-toolkit && cd ai-toolkit && git submodule update --init --recursive"
|
76 |
+
subprocess.run(commands, shell=True)
|
77 |
|
78 |
commands = f"python run.py {os.path.join(dataset_dir, 'config.yaml')}"
|
79 |
process = subprocess.Popen(commands, shell=True, cwd="ai-toolkit", env=os.environ)
|