Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -289,11 +289,15 @@ def start_training(
|
|
289 |
except Exception as e:
|
290 |
print(f"Failed to add HF_TOKEN secret to new space: {e}")
|
291 |
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
if not os.path.exists(
|
296 |
-
|
|
|
|
|
|
|
|
|
297 |
|
298 |
upload_folder(
|
299 |
folder_path=dataset_folder,
|
|
|
289 |
except Exception as e:
|
290 |
print(f"Failed to add HF_TOKEN secret to new space: {e}")
|
291 |
|
292 |
+
import subprocess
|
293 |
+
|
294 |
+
toolkit_src = os.path.join(dataset_folder, "ai-toolkit")
|
295 |
+
if not os.path.exists(toolkit_src):
|
296 |
+
subprocess.run(
|
297 |
+
f"git clone https://github.com/ostris/ai-toolkit.git {toolkit_src}",
|
298 |
+
shell=True,
|
299 |
+
check=True
|
300 |
+
)
|
301 |
|
302 |
upload_folder(
|
303 |
folder_path=dataset_folder,
|