Apply suggestions from code review

Co-authored-by: compilade <git@compilade.net>
This commit is contained in:
Brian 2024-07-14 10:29:03 +10:00 committed by brian khuu
parent ccff6c7fb2
commit 455c0e53ac

View file

@ -115,7 +115,7 @@ class Metadata:
return {}
with open(model_card_path, "r", encoding="utf-8") as f:
return cast("dict[str, Any]", frontmatter.load(f))
return frontmatter.load(f).to_dict()
@staticmethod
def load_hf_parameters(model_path: Optional[Path] = None) -> dict[str, Any]: