Unverified Commit ae3cbc95 authored by Sanchit Gandhi's avatar Sanchit Gandhi Committed by GitHub
Browse files

[modelcard] Set model name if empty (#20496)



* [modelcard] Set model name if empty

* no magic
Co-authored-by: default avatarSylvain Gugger <sylvain@huggingface.co>
Co-authored-by: default avatarSylvain Gugger <sylvain@huggingface.co>
parent 08fad080
......@@ -591,6 +591,8 @@ class TrainingSummary:
if model_name is None:
model_name = Path(trainer.args.output_dir).name
if len(model_name) == 0:
model_name = finetuned_from
# Add `generated_from_trainer` to the tags
if tags is None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment