Joseph Pollack commited on
Commit
7cafe2c
·
unverified ·
1 Parent(s): 708960a

adds model repo dataset id to the model card

Browse files
Files changed (2) hide show
  1. interface.py +8 -0
  2. templates/model_card.md +11 -0
interface.py CHANGED
@@ -439,6 +439,7 @@ def start_voxtral_training(
439
  freeze_audio_tower: bool,
440
  push_to_hub: bool,
441
  deploy_demo: bool,
 
442
  ) -> str:
443
  """Start Voxtral training and return collected logs as a string."""
444
  env = os.environ.copy()
@@ -526,6 +527,13 @@ def start_voxtral_training(
526
  "--max-epochs", str(epochs),
527
  "--trackio-url", env.get("TRACKIO_URL", "N/A"),
528
  ]
 
 
 
 
 
 
 
529
  all_logs.append(f"📤 Pushing model to Hugging Face Hub: {full_repo_name}")
530
  push_code = collect_logs_with_code(run_command_stream(push_args, env))
531
  if push_code != 0:
 
439
  freeze_audio_tower: bool,
440
  push_to_hub: bool,
441
  deploy_demo: bool,
442
+ dataset_repo_name_value: str = "",
443
  ) -> str:
444
  """Start Voxtral training and return collected logs as a string."""
445
  env = os.environ.copy()
 
527
  "--max-epochs", str(epochs),
528
  "--trackio-url", env.get("TRACKIO_URL", "N/A"),
529
  ]
530
+ # If user provided a Hub dataset repo id, include it for the model card
531
+ try:
532
+ ds_name = (dataset_repo_name_value or "").strip()
533
+ if ds_name and "/" in ds_name and " " not in ds_name and len(ds_name.split("/")) == 2:
534
+ push_args += ["--dataset-name", ds_name]
535
+ except Exception:
536
+ pass
537
  all_logs.append(f"📤 Pushing model to Hugging Face Hub: {full_repo_name}")
538
  push_code = collect_logs_with_code(run_command_stream(push_args, env))
539
  if push_code != 0:
templates/model_card.md CHANGED
@@ -5,6 +5,8 @@ tags:
5
  - asr
6
  - speech-to-text
7
  - fine-tuning
 
 
8
  pipeline_tag: automatic-speech-recognition
9
  base_model: {{base_model}}
10
  {{#if has_hub_dataset_id}}
@@ -38,6 +40,15 @@ max_seq_length: {{max_seq_length}}
38
  {{#if hardware_info}}
39
  hardware: "{{hardware_info}}"
40
  {{/if}}
 
 
 
 
 
 
 
 
 
41
  ---
42
 
43
  # {{model_name}}
 
5
  - asr
6
  - speech-to-text
7
  - fine-tuning
8
+ - tonic
9
+
10
  pipeline_tag: automatic-speech-recognition
11
  base_model: {{base_model}}
12
  {{#if has_hub_dataset_id}}
 
40
  {{#if hardware_info}}
41
  hardware: "{{hardware_info}}"
42
  {{/if}}
43
+ language:
44
+ - hi
45
+ - en
46
+ - fr
47
+ - de
48
+ - it
49
+ - pt
50
+ - nl
51
+ library_name: peft
52
  ---
53
 
54
  # {{model_name}}