Spaces:
Running
Running
Joseph Pollack
commited on
adds repo creation to solve issue
Browse files- interface.py +18 -0
- scripts/deploy_demo_space.py +3 -3
interface.py
CHANGED
@@ -510,6 +510,24 @@ def start_voxtral_training(
|
|
510 |
all_logs.append("✅ Training completed!")
|
511 |
|
512 |
# 2) Push to Hub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
513 |
if push_to_hub:
|
514 |
push_args = [
|
515 |
str(PROJECT_ROOT / "scripts/push_to_huggingface.py"),
|
|
|
510 |
all_logs.append("✅ Training completed!")
|
511 |
|
512 |
# 2) Push to Hub
|
513 |
+
# Push dataset first if dataset repo name is provided
|
514 |
+
if dataset_repo_name_value and dataset_repo_name_value.strip():
|
515 |
+
all_logs.append(f"📤 Pushing dataset to Hugging Face Hub: {dataset_repo_name_value}")
|
516 |
+
dataset_push_cmd = [
|
517 |
+
str(PROJECT_ROOT / "scripts/push_to_huggingface.py"),
|
518 |
+
"dataset",
|
519 |
+
str(PROJECT_ROOT / "datasets" / "voxtral_user" / "data.jsonl"),
|
520 |
+
dataset_repo_name_value,
|
521 |
+
]
|
522 |
+
try:
|
523 |
+
result = subprocess.run(dataset_push_cmd, capture_output=True, text=True, cwd=str(PROJECT_ROOT))
|
524 |
+
if result.returncode == 0:
|
525 |
+
all_logs.append("✅ Dataset pushed successfully!")
|
526 |
+
else:
|
527 |
+
all_logs.append(f"❌ Dataset push failed: {result.stderr}")
|
528 |
+
except Exception as e:
|
529 |
+
all_logs.append(f"❌ Dataset push error: {e}")
|
530 |
+
|
531 |
if push_to_hub:
|
532 |
push_args = [
|
533 |
str(PROJECT_ROOT / "scripts/push_to_huggingface.py"),
|
scripts/deploy_demo_space.py
CHANGED
@@ -482,10 +482,10 @@ os.environ['BRAND_PROJECT_URL'] = json.dumps({_json.dumps(self.brand_project_url
|
|
482 |
|
483 |
# Try multiple CLI variants depending on installed version
|
484 |
cli_attempts = [
|
485 |
-
["
|
486 |
-
["huggingface-cli", "space", "create", self.space_id, "--type", "gradio", "--hardware", "cpu-basic"],
|
487 |
["hf", "repo", "create", self.space_id, "--repo-type", "space", "--space-sdk", "gradio"],
|
488 |
-
["huggingface-cli", "repo", "create", self.space_id, "--repo-type", "space"
|
|
|
489 |
]
|
490 |
|
491 |
last_err = None
|
|
|
482 |
|
483 |
# Try multiple CLI variants depending on installed version
|
484 |
cli_attempts = [
|
485 |
+
["huggingface-cli", "repo", "create", self.space_id, "--repo-type", "space", "--space_sdk", "gradio"],
|
|
|
486 |
["hf", "repo", "create", self.space_id, "--repo-type", "space", "--space-sdk", "gradio"],
|
487 |
+
["huggingface-cli", "repo", "create", self.space_id, "--repo-type", "space"],
|
488 |
+
["hf", "repo", "create", self.space_id, "--repo-type", "space"],
|
489 |
]
|
490 |
|
491 |
last_err = None
|