Skip to content

Commit 88e257c

Browse files
committed
squash! model-conversion: add model card template for embeddings [no ci]
Fix pyright lint error.
1 parent 8a33075 commit 88e257c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/model-conversion/scripts/utils/hf-create-model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def load_template_and_substitute(template_path, **kwargs):
3434
repo_id = f"{args.namespace}/{args.model_name}-GGUF"
3535
print("Repository ID: ", repo_id)
3636

37+
repo_url = None
3738
if not args.dry_run:
3839
repo_url = api.create_repo(
3940
repo_id=repo_id,
@@ -71,7 +72,7 @@ def load_template_and_substitute(template_path, **kwargs):
7172
else:
7273
print("Failed to create model card.")
7374

74-
if not args.dry_run:
75+
if not args.dry_run and repo_url:
7576
print(f"Repository created: {repo_url}")
7677

7778

0 commit comments

Comments
 (0)