Skip to content

Commit e423371

Browse files
committed
Pass task arg throught to hf hub push
1 parent 48bf66b commit e423371

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

timm/models/_hub.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ def push_to_hf_hub(
404404
model_config: Optional[dict] = None,
405405
model_card: Optional[dict] = None,
406406
model_args: Optional[dict] = None,
407+
task_name: str = 'image-classification',
407408
safe_serialization: Union[bool, Literal["both"]] = 'both',
408409
):
409410
"""
@@ -444,7 +445,7 @@ def push_to_hf_hub(
444445
model_card = model_card or {}
445446
model_name = repo_id.split('/')[-1]
446447
readme_path = Path(tmpdir) / "README.md"
447-
readme_text = generate_readme(model_card, model_name)
448+
readme_text = generate_readme(model_card, model_name, task_name=task_name)
448449
readme_path.write_text(readme_text)
449450

450451
# Upload model and return

0 commit comments

Comments
 (0)