HfHub.Cards.ModelCardData (HfHub v0.2.0)

Copy Markdown View Source

Structured metadata for Model Cards.

Contains fields from the YAML frontmatter of a model's README.md.

Summary

Functions

Creates a ModelCardData struct from a parsed YAML frontmatter map.

Types

t()

@type t() :: %HfHub.Cards.ModelCardData{
  base_model: String.t() | [String.t()] | nil,
  co2_eq_emissions: map() | nil,
  datasets: [String.t()] | nil,
  eval_results: [HfHub.Cards.EvalResult.t()] | nil,
  extra: map(),
  inference: boolean() | map() | nil,
  language: String.t() | [String.t()] | nil,
  library_name: String.t() | nil,
  license: String.t() | nil,
  license_link: String.t() | nil,
  license_name: String.t() | nil,
  metrics: [String.t()] | nil,
  model_name: String.t() | nil,
  pipeline_tag: String.t() | nil,
  tags: [String.t()] | nil,
  widget: [map()] | nil
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Creates a ModelCardData struct from a parsed YAML frontmatter map.