import{s as Ba,o as Ea,n as Vl}from"../chunks/scheduler.6062bdaf.js";import{S as xa,i as Ia,g as p,s as e,r as h,A as Ga,h as i,f as a,c as n,j as $a,u as r,x as M,k as Za,y as _a,a as t,v as d,d as o,t as j,w as m}from"../chunks/index.4bca734e.js";import{T as Sl}from"../chunks/Tip.b9ac1f03.js";import{C as y}from"../chunks/CodeBlock.fa01571c.js";import{H as f,E as Ra}from"../chunks/EditOnGithub.74ab2baa.js";function Xa(J){let c,g='<a href="https://huggingface.co/spaces/huggingface/Model_Cards_Writing_Tool" rel="nofollow">New (beta)! Try our experimental Model Card Creator App</a>';return{c(){c=p("p"),c.innerHTML=g},l(u){c=i(u,"P",{"data-svelte-h":!0}),M(c)!=="svelte-19zmsk8"&&(c.innerHTML=g)},m(u,w){t(u,c,w)},p:Vl,d(u){u&&a(c)}}}function ka(J){let c,g="Note that you will have to have Jinja2 installed to use <code>from_template</code>. You can do so with <code>pip install Jinja2</code>.";return{c(){c=p("p"),c.innerHTML=g},l(u){c=i(u,"P",{"data-svelte-h":!0}),M(c)!=="svelte-tehb0q"&&(c.innerHTML=g)},m(u,w){t(u,c,w)},p:Vl,d(u){u&&a(c)}}}function va(J){let c,g='Note that using this function requires you to include the <code>model_name</code> attribute in <a href="/docs/huggingface_hub/pr_2388/en/package_reference/cards#huggingface_hub.ModelCardData">ModelCardData</a>.';return{c(){c=p("p"),c.innerHTML=g},l(u){c=i(u,"P",{"data-svelte-h":!0}),M(c)!=="svelte-1p11wzk"&&(c.innerHTML=g)},m(u,w){t(u,c,w)},p:Vl,d(u){u&&a(c)}}}function Aa(J){let c,g,u,w,C,_s,$,Hl=`The <code>huggingface_hub</code> library provides a Python interface to create, share, and update Model Cards.
Visit <a href="https://huggingface.co/docs/hub/models-cards" rel="nofollow">the dedicated documentation page</a>
for a deeper view of what Model Cards on the Hub are, and how they work under the hood.`,Rs,b,Xs,Z,ks,B,Ll='To load an existing card from the Hub, you can use the <a href="/docs/huggingface_hub/pr_2388/en/package_reference/cards#huggingface_hub.RepoCard.load">ModelCard.load()</a> function. Here, we’ll load the card from <a href="https://huggingface.co/nateraw/vit-base-beans" rel="nofollow"><code>nateraw/vit-base-beans</code></a>.',vs,E,As,x,zl="This card has some helpful attributes that you may want to access/leverage:",Ys,I,ql='<li><code>card.data</code>: Returns a <a href="/docs/huggingface_hub/pr_2388/en/package_reference/cards#huggingface_hub.ModelCardData">ModelCardData</a> instance with the model card’s metadata. Call <code>.to_dict()</code> on this instance to get the representation as a dictionary.</li> <li><code>card.text</code>: Returns the text of the card, <em>excluding the metadata header</em>.</li> <li><code>card.content</code>: Returns the text content of the card, <em>including the metadata header</em>.</li>',Ws,G,Ns,_,Qs,R,Pl="To initialize a Model Card from text, just pass the text content of the card to the <code>ModelCard</code> on init.",Fs,X,Ss,k,Dl="Another way you might want to do this is with f-strings. In the following example, we:",Vs,v,Kl='<li>Use <a href="/docs/huggingface_hub/pr_2388/en/package_reference/cards#huggingface_hub.CardData.to_yaml">ModelCardData.to_yaml()</a> to convert metadata we defined to YAML so we can use it to insert the YAML block in the model card.</li> <li>Show how you might use a template variable via Python f-strings.</li>',Hs,A,Ls,Y,Ol="The above example would leave us with a card that looks like this:",zs,W,qs,N,Ps,Q,sa="If you have <code>Jinja2</code> installed, you can create Model Cards from a jinja template file. Let’s see a basic example:",Ds,F,Ks,S,la="The resulting card’s markdown looks like this:",Os,V,sl,H,aa="If you update any card.data, it’ll reflect in the card itself.",ll,L,al,z,ta="Now, as you can see, the metadata header has been updated:",tl,q,el,P,ea='As you update the card data, you can validate the card is still valid against the Hub by calling <a href="/docs/huggingface_hub/pr_2388/en/package_reference/cards#huggingface_hub.RepoCard.validate">ModelCard.validate()</a>. This ensures that the card passes any validation rules set up on the Hugging Face Hub.',nl,D,pl,K,na='Instead of using your own template, you can also use the <a href="https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md" rel="nofollow">default template</a>, which is a fully featured model card with tons of sections you may want to fill out. Under the hood, it uses <a href="https://jinja.palletsprojects.com/en/3.1.x/" rel="nofollow">Jinja2</a> to fill out a template file.',il,T,Ml,O,cl,ss,hl,ls,pa='If you’re authenticated with the Hugging Face Hub (either by using <code>huggingface-cli login</code> or <a href="/docs/huggingface_hub/pr_2388/en/package_reference/login#huggingface_hub.login">login()</a>), you can push cards to the Hub by simply calling <a href="/docs/huggingface_hub/pr_2388/en/package_reference/cards#huggingface_hub.RepoCard.push_to_hub">ModelCard.push_to_hub()</a>. Let’s take a look at how to do that…',rl,as,ia="First, we’ll create a new repo called ‘hf-hub-modelcards-pr-test’ under the authenticated user’s namespace:",dl,ts,ol,es,Ma="Then, we’ll create a card from the default template (same as the one defined in the section above):",jl,ns,ml,ps,ca="Finally, we’ll push that up to the hub",ul,is,yl,Ms,ha='You can check out the resulting card <a href="https://huggingface.co/nateraw/hf-hub-modelcards-pr-test/blob/main/README.md" rel="nofollow">here</a>.',gl,cs,ra="If you instead wanted to push a card as a pull request, you can just say <code>create_pr=True</code> when calling <code>push_to_hub</code>:",wl,hs,fl,rs,da='A resulting PR created from this command can be seen <a href="https://huggingface.co/nateraw/hf-hub-modelcards-pr-test/discussions/3" rel="nofollow">here</a>.',Jl,ds,bl,os,oa="In this section we will see what metadata are in repo cards and how to update them.",Tl,js,ja=`<code>metadata</code> refers to a hash map (or key value) context that provides some high-level information about a model, dataset or Space. That information can include details such as the model’s <code>pipeline type</code>, <code>model_id</code> or <code>model_description</code>. For more detail you can take a look to these guides: <a href="https://huggingface.co/docs/hub/model-cards#model-card-metadata" rel="nofollow">Model Card</a>, <a href="https://huggingface.co/docs/hub/datasets-cards#dataset-card-metadata" rel="nofollow">Dataset Card</a> and <a href="https://huggingface.co/docs/hub/spaces-settings#spaces-settings" rel="nofollow">Spaces Settings</a>.
Now lets see some examples on how to update those metadata.`,Ul,ms,ma="Let’s start with a first example:",Cl,us,$l,ys,ua="With these two lines of code you will update the metadata to set a new <code>pipeline_tag</code>.",Zl,gs,ya=`By default, you cannot update a key that is already existing on the card. If you want to do so, you must pass
<code>overwrite=True</code> explicitly:`,Bl,ws,El,fs,ga=`It often happen that you want to suggest some changes to a repository
on which you don’t have write permission. You can do that by creating a PR on that repo which will allow the owners to
review and merge your suggestions.`,xl,Js,Il,bs,Gl,Ts,wa='To include evaluation results in the metadata <code>model-index</code>, you can pass an <a href="/docs/huggingface_hub/pr_2388/en/package_reference/cards#huggingface_hub.EvalResult">EvalResult</a> or a list of <code>EvalResult</code> with your associated evaluation results. Under the hood it’ll create the <code>model-index</code> when you call <code>card.data.to_dict()</code>. For more information on how this works, you can check out <a href="https://huggingface.co/docs/hub/models-cards#evaluation-results" rel="nofollow">this section of the Hub docs</a>.',_l,U,Rl,Us,Xl,Cs,fa="The resulting <code>card.data</code> should look like this:",kl,$s,vl,Zs,Ja="If you have more than one evaluation result you’d like to share, just pass a list of <code>EvalResult</code>:",Al,Bs,Yl,Es,ba="Which should leave you with the following <code>card.data</code>:",Wl,xs,Nl,Is,Ql,Gs,Fl;return C=new f({props:{title:"Create and share Model Cards",local:"create-and-share-model-cards",headingTag:"h1"}}),b=new Sl({props:{$$slots:{default:[Xa]},$$scope:{ctx:J}}}),Z=new f({props:{title:"Load a Model Card from the Hub",local:"load-a-model-card-from-the-hub",headingTag:"h2"}}),E=new y({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyME1vZGVsQ2FyZCUwQSUwQWNhcmQlMjAlM0QlMjBNb2RlbENhcmQubG9hZCgnbmF0ZXJhdyUyRnZpdC1iYXNlLWJlYW5zJyk=",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> ModelCard

card = ModelCard.load(<span class="hljs-string">&#x27;nateraw/vit-base-beans&#x27;</span>)`,wrap:!1}}),G=new f({props:{title:"Create Model Cards",local:"create-model-cards",headingTag:"h2"}}),_=new f({props:{title:"From Text",local:"from-text",headingTag:"h3"}}),X=new y({props:{code:"Y29udGVudCUyMCUzRCUyMCUyMiUyMiUyMiUwQS0tLSUwQWxhbmd1YWdlJTNBJTIwZW4lMEFsaWNlbnNlJTNBJTIwbWl0JTBBLS0tJTBBJTBBJTIzJTIwTXklMjBNb2RlbCUyMENhcmQlMEElMjIlMjIlMjIlMEElMEFjYXJkJTIwJTNEJTIwTW9kZWxDYXJkKGNvbnRlbnQpJTBBY2FyZC5kYXRhLnRvX2RpY3QoKSUyMCUzRCUzRCUyMCU3QidsYW5ndWFnZSclM0ElMjAnZW4nJTJDJTIwJ2xpY2Vuc2UnJTNBJTIwJ21pdCclN0QlMjAlMjAlMjMlMjBUcnVl",highlighted:`content = <span class="hljs-string">&quot;&quot;&quot;
---
language: en
license: mit
---

# My Model Card
&quot;&quot;&quot;</span>

card = ModelCard(content)
card.data.to_dict() == {<span class="hljs-string">&#x27;language&#x27;</span>: <span class="hljs-string">&#x27;en&#x27;</span>, <span class="hljs-string">&#x27;license&#x27;</span>: <span class="hljs-string">&#x27;mit&#x27;</span>}  <span class="hljs-comment"># True</span>`,wrap:!1}}),A=new y({props:{code:"Y2FyZF9kYXRhJTIwJTNEJTIwTW9kZWxDYXJkRGF0YShsYW5ndWFnZSUzRCdlbiclMkMlMjBsaWNlbnNlJTNEJ21pdCclMkMlMjBsaWJyYXJ5JTNEJ3RpbW0nKSUwQSUwQWV4YW1wbGVfdGVtcGxhdGVfdmFyJTIwJTNEJTIwJ25hdGVyYXcnJTBBY29udGVudCUyMCUzRCUyMGYlMjIlMjIlMjIlMEEtLS0lMEElN0IlMjBjYXJkX2RhdGEudG9feWFtbCgpJTIwJTdEJTBBLS0tJTBBJTBBJTIzJTIwTXklMjBNb2RlbCUyMENhcmQlMEElMEFUaGlzJTIwbW9kZWwlMjBjcmVhdGVkJTIwYnklMjAlNUIlNDAlN0JleGFtcGxlX3RlbXBsYXRlX3ZhciU3RCU1RChodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkYlN0JleGFtcGxlX3RlbXBsYXRlX3ZhciU3RCklMEElMjIlMjIlMjIlMEElMEFjYXJkJTIwJTNEJTIwTW9kZWxDYXJkKGNvbnRlbnQpJTBBcHJpbnQoY2FyZCk=",highlighted:`card_data = ModelCardData(language=<span class="hljs-string">&#x27;en&#x27;</span>, license=<span class="hljs-string">&#x27;mit&#x27;</span>, library=<span class="hljs-string">&#x27;timm&#x27;</span>)

example_template_var = <span class="hljs-string">&#x27;nateraw&#x27;</span>
content = <span class="hljs-string">f&quot;&quot;&quot;
---
<span class="hljs-subst">{ card_data.to_yaml() }</span>
---

# My Model Card

This model created by [@<span class="hljs-subst">{example_template_var}</span>](https://github.com/<span class="hljs-subst">{example_template_var}</span>)
&quot;&quot;&quot;</span>

card = ModelCard(content)
<span class="hljs-built_in">print</span>(card)`,wrap:!1}}),W=new y({props:{code:"LS0tJTBBbGFuZ3VhZ2UlM0ElMjBlbiUwQWxpY2Vuc2UlM0ElMjBtaXQlMEFsaWJyYXJ5JTNBJTIwdGltbSUwQS0tLSUwQSUwQSUyMyUyME15JTIwTW9kZWwlMjBDYXJkJTBBJTBBVGhpcyUyMG1vZGVsJTIwY3JlYXRlZCUyMGJ5JTIwJTVCJTQwbmF0ZXJhdyU1RChodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZuYXRlcmF3KQ==",highlighted:`<span class="hljs-meta">---</span>
<span class="hljs-attr">language:</span> <span class="hljs-string">en</span>
<span class="hljs-attr">license:</span> <span class="hljs-string">mit</span>
<span class="hljs-attr">library:</span> <span class="hljs-string">timm</span>
<span class="hljs-meta">---
</span>
<span class="hljs-comment"># My Model Card</span>

<span class="hljs-string">This</span> <span class="hljs-string">model</span> <span class="hljs-string">created</span> <span class="hljs-string">by</span> [<span class="hljs-string">@nateraw</span>]<span class="hljs-string">(https://github.com/nateraw)</span>`,wrap:!1}}),N=new f({props:{title:"From a Jinja Template",local:"from-a-jinja-template",headingTag:"h3"}}),F=new y({props:{code:"ZnJvbSUyMHBhdGhsaWIlMjBpbXBvcnQlMjBQYXRoJTBBJTBBZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyME1vZGVsQ2FyZCUyQyUyME1vZGVsQ2FyZERhdGElMEElMEElMjMlMjBEZWZpbmUlMjB5b3VyJTIwamluamElMjB0ZW1wbGF0ZSUwQXRlbXBsYXRlX3RleHQlMjAlM0QlMjAlMjIlMjIlMjIlMEEtLS0lMEElN0IlN0IlMjBjYXJkX2RhdGElMjAlN0QlN0QlMEEtLS0lMEElMEElMjMlMjBNb2RlbCUyMENhcmQlMjBmb3IlMjBNeUNvb2xNb2RlbCUwQSUwQVRoaXMlMjBtb2RlbCUyMGRvZXMlMjB0aGlzJTIwYW5kJTIwdGhhdC4lMEElMEFUaGlzJTIwbW9kZWwlMjB3YXMlMjBjcmVhdGVkJTIwYnklMjAlNUIlNDAlN0IlN0IlMjBhdXRob3IlMjAlN0QlN0QlNUQoaHR0cHMlM0ElMkYlMkZoZi5jbyUyRiU3QiU3QmF1dGhvciU3RCU3RCkuJTBBJTIyJTIyJTIyLnN0cmlwKCklMEElMEElMjMlMjBXcml0ZSUyMHRoZSUyMHRlbXBsYXRlJTIwdG8lMjBhJTIwZmlsZSUwQVBhdGgoJ2N1c3RvbV90ZW1wbGF0ZS5tZCcpLndyaXRlX3RleHQodGVtcGxhdGVfdGV4dCklMEElMEElMjMlMjBEZWZpbmUlMjBjYXJkJTIwbWV0YWRhdGElMEFjYXJkX2RhdGElMjAlM0QlMjBNb2RlbENhcmREYXRhKGxhbmd1YWdlJTNEJ2VuJyUyQyUyMGxpY2Vuc2UlM0QnbWl0JyUyQyUyMGxpYnJhcnlfbmFtZSUzRCdrZXJhcycpJTBBJTBBJTIzJTIwQ3JlYXRlJTIwY2FyZCUyMGZyb20lMjB0ZW1wbGF0ZSUyQyUyMHBhc3NpbmclMjBpdCUyMGFueSUyMGppbmphJTIwdGVtcGxhdGUlMjB2YXJpYWJsZXMlMjB5b3UlMjB3YW50LiUwQSUyMyUyMEluJTIwb3VyJTIwY2FzZSUyQyUyMHdlJ2xsJTIwcGFzcyUyMGF1dGhvciUwQWNhcmQlMjAlM0QlMjBNb2RlbENhcmQuZnJvbV90ZW1wbGF0ZShjYXJkX2RhdGElMkMlMjB0ZW1wbGF0ZV9wYXRoJTNEJ2N1c3RvbV90ZW1wbGF0ZS5tZCclMkMlMjBhdXRob3IlM0QnbmF0ZXJhdycpJTBBY2FyZC5zYXZlKCdteV9tb2RlbF9jYXJkXzEubWQnKSUwQXByaW50KGNhcmQp",highlighted:`<span class="hljs-keyword">from</span> pathlib <span class="hljs-keyword">import</span> Path

<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> ModelCard, ModelCardData

<span class="hljs-comment"># Define your jinja template</span>
template_text = <span class="hljs-string">&quot;&quot;&quot;
---
{{ card_data }}
---

# Model Card for MyCoolModel

This model does this and that.

This model was created by [@{{ author }}](https://hf.co/{{author}}).
&quot;&quot;&quot;</span>.strip()

<span class="hljs-comment"># Write the template to a file</span>
Path(<span class="hljs-string">&#x27;custom_template.md&#x27;</span>).write_text(template_text)

<span class="hljs-comment"># Define card metadata</span>
card_data = ModelCardData(language=<span class="hljs-string">&#x27;en&#x27;</span>, license=<span class="hljs-string">&#x27;mit&#x27;</span>, library_name=<span class="hljs-string">&#x27;keras&#x27;</span>)

<span class="hljs-comment"># Create card from template, passing it any jinja template variables you want.</span>
<span class="hljs-comment"># In our case, we&#x27;ll pass author</span>
card = ModelCard.from_template(card_data, template_path=<span class="hljs-string">&#x27;custom_template.md&#x27;</span>, author=<span class="hljs-string">&#x27;nateraw&#x27;</span>)
card.save(<span class="hljs-string">&#x27;my_model_card_1.md&#x27;</span>)
<span class="hljs-built_in">print</span>(card)`,wrap:!1}}),V=new y({props:{code:"LS0tJTBBbGFuZ3VhZ2UlM0ElMjBlbiUwQWxpY2Vuc2UlM0ElMjBtaXQlMEFsaWJyYXJ5X25hbWUlM0ElMjBrZXJhcyUwQS0tLSUwQSUwQSUyMyUyME1vZGVsJTIwQ2FyZCUyMGZvciUyME15Q29vbE1vZGVsJTBBJTBBVGhpcyUyMG1vZGVsJTIwZG9lcyUyMHRoaXMlMjBhbmQlMjB0aGF0LiUwQSUwQVRoaXMlMjBtb2RlbCUyMHdhcyUyMGNyZWF0ZWQlMjBieSUyMCU1QiU0MG5hdGVyYXclNUQoaHR0cHMlM0ElMkYlMkZoZi5jbyUyRm5hdGVyYXcpLg==",highlighted:`<span class="hljs-meta">---</span>
<span class="hljs-attr">language:</span> <span class="hljs-string">en</span>
<span class="hljs-attr">license:</span> <span class="hljs-string">mit</span>
<span class="hljs-attr">library_name:</span> <span class="hljs-string">keras</span>
<span class="hljs-meta">---
</span>
<span class="hljs-comment"># Model Card for MyCoolModel</span>

<span class="hljs-string">This</span> <span class="hljs-string">model</span> <span class="hljs-string">does</span> <span class="hljs-string">this</span> <span class="hljs-string">and</span> <span class="hljs-string">that.</span>

<span class="hljs-string">This</span> <span class="hljs-string">model</span> <span class="hljs-string">was</span> <span class="hljs-string">created</span> <span class="hljs-string">by</span> [<span class="hljs-string">@nateraw</span>]<span class="hljs-string">(https://hf.co/nateraw).</span>`,wrap:!1}}),L=new y({props:{code:"Y2FyZC5kYXRhLmxpYnJhcnlfbmFtZSUyMCUzRCUyMCd0aW1tJyUwQWNhcmQuZGF0YS5sYW5ndWFnZSUyMCUzRCUyMCdmciclMEFjYXJkLmRhdGEubGljZW5zZSUyMCUzRCUyMCdhcGFjaGUtMi4wJyUwQXByaW50KGNhcmQp",highlighted:`card<span class="hljs-selector-class">.data</span><span class="hljs-selector-class">.library_name</span> = <span class="hljs-string">&#x27;timm&#x27;</span>
card<span class="hljs-selector-class">.data</span><span class="hljs-selector-class">.language</span> = <span class="hljs-string">&#x27;fr&#x27;</span>
card<span class="hljs-selector-class">.data</span><span class="hljs-selector-class">.license</span> = <span class="hljs-string">&#x27;apache-2.0&#x27;</span>
<span class="hljs-function"><span class="hljs-title">print</span><span class="hljs-params">(card)</span></span>`,wrap:!1}}),q=new y({props:{code:"LS0tJTBBbGFuZ3VhZ2UlM0ElMjBmciUwQWxpY2Vuc2UlM0ElMjBhcGFjaGUtMi4wJTBBbGlicmFyeV9uYW1lJTNBJTIwdGltbSUwQS0tLSUwQSUwQSUyMyUyME1vZGVsJTIwQ2FyZCUyMGZvciUyME15Q29vbE1vZGVsJTBBJTBBVGhpcyUyMG1vZGVsJTIwZG9lcyUyMHRoaXMlMjBhbmQlMjB0aGF0LiUwQSUwQVRoaXMlMjBtb2RlbCUyMHdhcyUyMGNyZWF0ZWQlMjBieSUyMCU1QiU0MG5hdGVyYXclNUQoaHR0cHMlM0ElMkYlMkZoZi5jbyUyRm5hdGVyYXcpLg==",highlighted:`<span class="hljs-meta">---</span>
<span class="hljs-attr">language:</span> <span class="hljs-string">fr</span>
<span class="hljs-attr">license:</span> <span class="hljs-string">apache-2.0</span>
<span class="hljs-attr">library_name:</span> <span class="hljs-string">timm</span>
<span class="hljs-meta">---
</span>
<span class="hljs-comment"># Model Card for MyCoolModel</span>

<span class="hljs-string">This</span> <span class="hljs-string">model</span> <span class="hljs-string">does</span> <span class="hljs-string">this</span> <span class="hljs-string">and</span> <span class="hljs-string">that.</span>

<span class="hljs-string">This</span> <span class="hljs-string">model</span> <span class="hljs-string">was</span> <span class="hljs-string">created</span> <span class="hljs-string">by</span> [<span class="hljs-string">@nateraw</span>]<span class="hljs-string">(https://hf.co/nateraw).</span>`,wrap:!1}}),D=new f({props:{title:"From the Default Template",local:"from-the-default-template",headingTag:"h3"}}),T=new Sl({props:{$$slots:{default:[ka]},$$scope:{ctx:J}}}),O=new y({props:{code:"Y2FyZF9kYXRhJTIwJTNEJTIwTW9kZWxDYXJkRGF0YShsYW5ndWFnZSUzRCdlbiclMkMlMjBsaWNlbnNlJTNEJ21pdCclMkMlMjBsaWJyYXJ5X25hbWUlM0Qna2VyYXMnKSUwQWNhcmQlMjAlM0QlMjBNb2RlbENhcmQuZnJvbV90ZW1wbGF0ZSglMEElMjAlMjAlMjAlMjBjYXJkX2RhdGElMkMlMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUzRCdteS1jb29sLW1vZGVsJyUyQyUwQSUyMCUyMCUyMCUyMG1vZGVsX2Rlc2NyaXB0aW9uJTNEJTIydGhpcyUyMG1vZGVsJTIwZG9lcyUyMHRoaXMlMjBhbmQlMjB0aGF0JTIyJTJDJTBBJTIwJTIwJTIwJTIwZGV2ZWxvcGVycyUzRCUyMk5hdGUlMjBSYXclMjIlMkMlMEElMjAlMjAlMjAlMjByZXBvJTNEJTIyaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGaHVnZ2luZ2ZhY2UlMkZodWdnaW5nZmFjZV9odWIlMjIlMkMlMEEpJTBBY2FyZC5zYXZlKCdteV9tb2RlbF9jYXJkXzIubWQnKSUwQXByaW50KGNhcmQp",highlighted:`card_data = ModelCardData(language=<span class="hljs-string">&#x27;en&#x27;</span>, license=<span class="hljs-string">&#x27;mit&#x27;</span>, library_name=<span class="hljs-string">&#x27;keras&#x27;</span>)
card = ModelCard.from_template(
    card_data,
    model_id=<span class="hljs-string">&#x27;my-cool-model&#x27;</span>,
    model_description=<span class="hljs-string">&quot;this model does this and that&quot;</span>,
    developers=<span class="hljs-string">&quot;Nate Raw&quot;</span>,
    repo=<span class="hljs-string">&quot;https://github.com/huggingface/huggingface_hub&quot;</span>,
)
card.save(<span class="hljs-string">&#x27;my_model_card_2.md&#x27;</span>)
<span class="hljs-built_in">print</span>(card)`,wrap:!1}}),ss=new f({props:{title:"Share Model Cards",local:"share-model-cards",headingTag:"h2"}}),ts=new y({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMHdob2FtaSUyQyUyMGNyZWF0ZV9yZXBvJTBBJTBBdXNlciUyMCUzRCUyMHdob2FtaSgpJTVCJ25hbWUnJTVEJTBBcmVwb19pZCUyMCUzRCUyMGYnJTdCdXNlciU3RCUyRmhmLWh1Yi1tb2RlbGNhcmRzLXByLXRlc3QnJTBBdXJsJTIwJTNEJTIwY3JlYXRlX3JlcG8ocmVwb19pZCUyQyUyMGV4aXN0X29rJTNEVHJ1ZSk=",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> whoami, create_repo

user = whoami()[<span class="hljs-string">&#x27;name&#x27;</span>]
repo_id = <span class="hljs-string">f&#x27;<span class="hljs-subst">{user}</span>/hf-hub-modelcards-pr-test&#x27;</span>
url = create_repo(repo_id, exist_ok=<span class="hljs-literal">True</span>)`,wrap:!1}}),ns=new y({props:{code:"Y2FyZF9kYXRhJTIwJTNEJTIwTW9kZWxDYXJkRGF0YShsYW5ndWFnZSUzRCdlbiclMkMlMjBsaWNlbnNlJTNEJ21pdCclMkMlMjBsaWJyYXJ5X25hbWUlM0Qna2VyYXMnKSUwQWNhcmQlMjAlM0QlMjBNb2RlbENhcmQuZnJvbV90ZW1wbGF0ZSglMEElMjAlMjAlMjAlMjBjYXJkX2RhdGElMkMlMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUzRCdteS1jb29sLW1vZGVsJyUyQyUwQSUyMCUyMCUyMCUyMG1vZGVsX2Rlc2NyaXB0aW9uJTNEJTIydGhpcyUyMG1vZGVsJTIwZG9lcyUyMHRoaXMlMjBhbmQlMjB0aGF0JTIyJTJDJTBBJTIwJTIwJTIwJTIwZGV2ZWxvcGVycyUzRCUyMk5hdGUlMjBSYXclMjIlMkMlMEElMjAlMjAlMjAlMjByZXBvJTNEJTIyaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGaHVnZ2luZ2ZhY2UlMkZodWdnaW5nZmFjZV9odWIlMjIlMkMlMEEp",highlighted:`card_data = ModelCardData(language=<span class="hljs-string">&#x27;en&#x27;</span>, license=<span class="hljs-string">&#x27;mit&#x27;</span>, library_name=<span class="hljs-string">&#x27;keras&#x27;</span>)
card = ModelCard.from_template(
    card_data,
    model_id=<span class="hljs-string">&#x27;my-cool-model&#x27;</span>,
    model_description=<span class="hljs-string">&quot;this model does this and that&quot;</span>,
    developers=<span class="hljs-string">&quot;Nate Raw&quot;</span>,
    repo=<span class="hljs-string">&quot;https://github.com/huggingface/huggingface_hub&quot;</span>,
)`,wrap:!1}}),is=new y({props:{code:"Y2FyZC5wdXNoX3RvX2h1YihyZXBvX2lkKQ==",highlighted:"card.push_to_hub(repo_id)",wrap:!1}}),hs=new y({props:{code:"Y2FyZC5wdXNoX3RvX2h1YihyZXBvX2lkJTJDJTIwY3JlYXRlX3ByJTNEVHJ1ZSk=",highlighted:'card.push_to_hub(repo_id, create_pr=<span class="hljs-literal">True</span>)',wrap:!1}}),ds=new f({props:{title:"Update metadata",local:"update-metadata",headingTag:"h2"}}),us=new y({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG1ldGFkYXRhX3VwZGF0ZSUwQW1ldGFkYXRhX3VwZGF0ZSglMjJ1c2VybmFtZSUyRm15LWNvb2wtbW9kZWwlMjIlMkMlMjAlN0IlMjJwaXBlbGluZV90YWclMjIlM0ElMjAlMjJpbWFnZS1jbGFzc2lmaWNhdGlvbiUyMiU3RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> metadata_update
<span class="hljs-meta">&gt;&gt;&gt; </span>metadata_update(<span class="hljs-string">&quot;username/my-cool-model&quot;</span>, {<span class="hljs-string">&quot;pipeline_tag&quot;</span>: <span class="hljs-string">&quot;image-classification&quot;</span>})`,wrap:!1}}),ws=new y({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG1ldGFkYXRhX3VwZGF0ZSUwQW1ldGFkYXRhX3VwZGF0ZSglMjJ1c2VybmFtZSUyRm15LWNvb2wtbW9kZWwlMjIlMkMlMjAlN0IlMjJwaXBlbGluZV90YWclMjIlM0ElMjAlMjJ0ZXh0LWdlbmVyYXRpb24lMjIlN0QlMkMlMjBvdmVyd3JpdGUlM0RUcnVlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> metadata_update
<span class="hljs-meta">&gt;&gt;&gt; </span>metadata_update(<span class="hljs-string">&quot;username/my-cool-model&quot;</span>, {<span class="hljs-string">&quot;pipeline_tag&quot;</span>: <span class="hljs-string">&quot;text-generation&quot;</span>}, overwrite=<span class="hljs-literal">True</span>)`,wrap:!1}}),Js=new y({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG1ldGFkYXRhX3VwZGF0ZSUwQW1ldGFkYXRhX3VwZGF0ZSglMjJzb21lb25lJTJGbW9kZWwlMjIlMkMlMjAlN0IlMjJwaXBlbGluZV90YWclMjIlM0ElMjAlMjJ0ZXh0LWNsYXNzaWZpY2F0aW9uJTIyJTdEJTJDJTIwY3JlYXRlX3ByJTNEVHJ1ZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> metadata_update
<span class="hljs-meta">&gt;&gt;&gt; </span>metadata_update(<span class="hljs-string">&quot;someone/model&quot;</span>, {<span class="hljs-string">&quot;pipeline_tag&quot;</span>: <span class="hljs-string">&quot;text-classification&quot;</span>}, create_pr=<span class="hljs-literal">True</span>)`,wrap:!1}}),bs=new f({props:{title:"Include Evaluation Results",local:"include-evaluation-results",headingTag:"h2"}}),U=new Sl({props:{$$slots:{default:[va]},$$scope:{ctx:J}}}),Us=new y({props:{code:"Y2FyZF9kYXRhJTIwJTNEJTIwTW9kZWxDYXJkRGF0YSglMEElMjAlMjAlMjAlMjBsYW5ndWFnZSUzRCdlbiclMkMlMEElMjAlMjAlMjAlMjBsaWNlbnNlJTNEJ21pdCclMkMlMEElMjAlMjAlMjAlMjBtb2RlbF9uYW1lJTNEJ215LWNvb2wtbW9kZWwnJTJDJTBBJTIwJTIwJTIwJTIwZXZhbF9yZXN1bHRzJTIwJTNEJTIwRXZhbFJlc3VsdCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB0YXNrX3R5cGUlM0QnaW1hZ2UtY2xhc3NpZmljYXRpb24nJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZGF0YXNldF90eXBlJTNEJ2JlYW5zJyUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGRhdGFzZXRfbmFtZSUzRCdCZWFucyclMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtZXRyaWNfdHlwZSUzRCdhY2N1cmFjeSclMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtZXRyaWNfdmFsdWUlM0QwLjclMEElMjAlMjAlMjAlMjApJTBBKSUwQSUwQWNhcmQlMjAlM0QlMjBNb2RlbENhcmQuZnJvbV90ZW1wbGF0ZShjYXJkX2RhdGEpJTBBcHJpbnQoY2FyZC5kYXRhKQ==",highlighted:`card_data = ModelCardData(
    language=<span class="hljs-string">&#x27;en&#x27;</span>,
    license=<span class="hljs-string">&#x27;mit&#x27;</span>,
    model_name=<span class="hljs-string">&#x27;my-cool-model&#x27;</span>,
    eval_results = EvalResult(
        task_type=<span class="hljs-string">&#x27;image-classification&#x27;</span>,
        dataset_type=<span class="hljs-string">&#x27;beans&#x27;</span>,
        dataset_name=<span class="hljs-string">&#x27;Beans&#x27;</span>,
        metric_type=<span class="hljs-string">&#x27;accuracy&#x27;</span>,
        metric_value=<span class="hljs-number">0.7</span>
    )
)

card = ModelCard.from_template(card_data)
<span class="hljs-built_in">print</span>(card.data)`,wrap:!1}}),$s=new y({props:{code:"bGFuZ3VhZ2UlM0ElMjBlbiUwQWxpY2Vuc2UlM0ElMjBtaXQlMEFtb2RlbC1pbmRleCUzQSUwQS0lMjBuYW1lJTNBJTIwbXktY29vbC1tb2RlbCUwQSUyMCUyMHJlc3VsdHMlM0ElMEElMjAlMjAtJTIwdGFzayUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMHR5cGUlM0ElMjBpbWFnZS1jbGFzc2lmaWNhdGlvbiUwQSUyMCUyMCUyMCUyMGRhdGFzZXQlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjBuYW1lJTNBJTIwQmVhbnMlMEElMjAlMjAlMjAlMjAlMjAlMjB0eXBlJTNBJTIwYmVhbnMlMEElMjAlMjAlMjAlMjBtZXRyaWNzJTNBJTBBJTIwJTIwJTIwJTIwLSUyMHR5cGUlM0ElMjBhY2N1cmFjeSUwQSUyMCUyMCUyMCUyMCUyMCUyMHZhbHVlJTNBJTIwMC43",highlighted:`<span class="hljs-attribute">language</span><span class="hljs-punctuation">:</span> <span class="hljs-string">en</span>
<span class="hljs-attribute">license</span><span class="hljs-punctuation">:</span> <span class="hljs-string">mit</span>
<span class="hljs-attribute">model-index</span><span class="hljs-punctuation">:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">name: my-cool-model</span>
  <span class="hljs-attribute">results</span><span class="hljs-punctuation">:</span>
  <span class="hljs-bullet">-</span> <span class="hljs-string">task:</span>
      <span class="hljs-attribute">type</span><span class="hljs-punctuation">:</span> <span class="hljs-string">image-classification</span>
    <span class="hljs-attribute">dataset</span><span class="hljs-punctuation">:</span>
      <span class="hljs-attribute">name</span><span class="hljs-punctuation">:</span> <span class="hljs-string">Beans</span>
      <span class="hljs-attribute">type</span><span class="hljs-punctuation">:</span> <span class="hljs-string">beans</span>
    <span class="hljs-attribute">metrics</span><span class="hljs-punctuation">:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">type: accuracy</span>
      <span class="hljs-attribute">value</span><span class="hljs-punctuation">:</span> <span class="hljs-string">0.7</span>`,wrap:!1}}),Bs=new y({props:{code:"Y2FyZF9kYXRhJTIwJTNEJTIwTW9kZWxDYXJkRGF0YSglMEElMjAlMjAlMjAlMjBsYW5ndWFnZSUzRCdlbiclMkMlMEElMjAlMjAlMjAlMjBsaWNlbnNlJTNEJ21pdCclMkMlMEElMjAlMjAlMjAlMjBtb2RlbF9uYW1lJTNEJ215LWNvb2wtbW9kZWwnJTJDJTBBJTIwJTIwJTIwJTIwZXZhbF9yZXN1bHRzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwRXZhbFJlc3VsdCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB0YXNrX3R5cGUlM0QnaW1hZ2UtY2xhc3NpZmljYXRpb24nJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZGF0YXNldF90eXBlJTNEJ2JlYW5zJyUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGRhdGFzZXRfbmFtZSUzRCdCZWFucyclMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtZXRyaWNfdHlwZSUzRCdhY2N1cmFjeSclMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtZXRyaWNfdmFsdWUlM0QwLjclMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjApJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwRXZhbFJlc3VsdCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB0YXNrX3R5cGUlM0QnaW1hZ2UtY2xhc3NpZmljYXRpb24nJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZGF0YXNldF90eXBlJTNEJ2JlYW5zJyUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGRhdGFzZXRfbmFtZSUzRCdCZWFucyclMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtZXRyaWNfdHlwZSUzRCdmMSclMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtZXRyaWNfdmFsdWUlM0QwLjY1JTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwKSUwQSUyMCUyMCUyMCUyMCU1RCUwQSklMEFjYXJkJTIwJTNEJTIwTW9kZWxDYXJkLmZyb21fdGVtcGxhdGUoY2FyZF9kYXRhKSUwQWNhcmQuZGF0YQ==",highlighted:`card_data = ModelCardData(
    language=<span class="hljs-string">&#x27;en&#x27;</span>,
    license=<span class="hljs-string">&#x27;mit&#x27;</span>,
    model_name=<span class="hljs-string">&#x27;my-cool-model&#x27;</span>,
    eval_results = [
        EvalResult(
            task_type=<span class="hljs-string">&#x27;image-classification&#x27;</span>,
            dataset_type=<span class="hljs-string">&#x27;beans&#x27;</span>,
            dataset_name=<span class="hljs-string">&#x27;Beans&#x27;</span>,
            metric_type=<span class="hljs-string">&#x27;accuracy&#x27;</span>,
            metric_value=<span class="hljs-number">0.7</span>
        ),
        EvalResult(
            task_type=<span class="hljs-string">&#x27;image-classification&#x27;</span>,
            dataset_type=<span class="hljs-string">&#x27;beans&#x27;</span>,
            dataset_name=<span class="hljs-string">&#x27;Beans&#x27;</span>,
            metric_type=<span class="hljs-string">&#x27;f1&#x27;</span>,
            metric_value=<span class="hljs-number">0.65</span>
        )
    ]
)
card = ModelCard.from_template(card_data)
card.data`,wrap:!1}}),xs=new y({props:{code:"bGFuZ3VhZ2UlM0ElMjBlbiUwQWxpY2Vuc2UlM0ElMjBtaXQlMEFtb2RlbC1pbmRleCUzQSUwQS0lMjBuYW1lJTNBJTIwbXktY29vbC1tb2RlbCUwQSUyMCUyMHJlc3VsdHMlM0ElMEElMjAlMjAtJTIwdGFzayUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMHR5cGUlM0ElMjBpbWFnZS1jbGFzc2lmaWNhdGlvbiUwQSUyMCUyMCUyMCUyMGRhdGFzZXQlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjBuYW1lJTNBJTIwQmVhbnMlMEElMjAlMjAlMjAlMjAlMjAlMjB0eXBlJTNBJTIwYmVhbnMlMEElMjAlMjAlMjAlMjBtZXRyaWNzJTNBJTBBJTIwJTIwJTIwJTIwLSUyMHR5cGUlM0ElMjBhY2N1cmFjeSUwQSUyMCUyMCUyMCUyMCUyMCUyMHZhbHVlJTNBJTIwMC43JTBBJTIwJTIwJTIwJTIwLSUyMHR5cGUlM0ElMjBmMSUwQSUyMCUyMCUyMCUyMCUyMCUyMHZhbHVlJTNBJTIwMC42NQ==",highlighted:`<span class="hljs-attribute">language</span><span class="hljs-punctuation">:</span> <span class="hljs-string">en</span>
<span class="hljs-attribute">license</span><span class="hljs-punctuation">:</span> <span class="hljs-string">mit</span>
<span class="hljs-attribute">model-index</span><span class="hljs-punctuation">:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">name: my-cool-model</span>
  <span class="hljs-attribute">results</span><span class="hljs-punctuation">:</span>
  <span class="hljs-bullet">-</span> <span class="hljs-string">task:</span>
      <span class="hljs-attribute">type</span><span class="hljs-punctuation">:</span> <span class="hljs-string">image-classification</span>
    <span class="hljs-attribute">dataset</span><span class="hljs-punctuation">:</span>
      <span class="hljs-attribute">name</span><span class="hljs-punctuation">:</span> <span class="hljs-string">Beans</span>
      <span class="hljs-attribute">type</span><span class="hljs-punctuation">:</span> <span class="hljs-string">beans</span>
    <span class="hljs-attribute">metrics</span><span class="hljs-punctuation">:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">type: accuracy</span>
      <span class="hljs-attribute">value</span><span class="hljs-punctuation">:</span> <span class="hljs-string">0.7</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">type: f1</span>
      <span class="hljs-attribute">value</span><span class="hljs-punctuation">:</span> <span class="hljs-string">0.65</span>`,wrap:!1}}),Is=new Ra({props:{source:"https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/guides/model-cards.md"}}),{c(){c=p("meta"),g=e(),u=p("p"),w=e(),h(C.$$.fragment),_s=e(),$=p("p"),$.innerHTML=Hl,Rs=e(),h(b.$$.fragment),Xs=e(),h(Z.$$.fragment),ks=e(),B=p("p"),B.innerHTML=Ll,vs=e(),h(E.$$.fragment),As=e(),x=p("p"),x.textContent=zl,Ys=e(),I=p("ul"),I.innerHTML=ql,Ws=e(),h(G.$$.fragment),Ns=e(),h(_.$$.fragment),Qs=e(),R=p("p"),R.innerHTML=Pl,Fs=e(),h(X.$$.fragment),Ss=e(),k=p("p"),k.textContent=Dl,Vs=e(),v=p("ul"),v.innerHTML=Kl,Hs=e(),h(A.$$.fragment),Ls=e(),Y=p("p"),Y.textContent=Ol,zs=e(),h(W.$$.fragment),qs=e(),h(N.$$.fragment),Ps=e(),Q=p("p"),Q.innerHTML=sa,Ds=e(),h(F.$$.fragment),Ks=e(),S=p("p"),S.textContent=la,Os=e(),h(V.$$.fragment),sl=e(),H=p("p"),H.textContent=aa,ll=e(),h(L.$$.fragment),al=e(),z=p("p"),z.textContent=ta,tl=e(),h(q.$$.fragment),el=e(),P=p("p"),P.innerHTML=ea,nl=e(),h(D.$$.fragment),pl=e(),K=p("p"),K.innerHTML=na,il=e(),h(T.$$.fragment),Ml=e(),h(O.$$.fragment),cl=e(),h(ss.$$.fragment),hl=e(),ls=p("p"),ls.innerHTML=pa,rl=e(),as=p("p"),as.textContent=ia,dl=e(),h(ts.$$.fragment),ol=e(),es=p("p"),es.textContent=Ma,jl=e(),h(ns.$$.fragment),ml=e(),ps=p("p"),ps.textContent=ca,ul=e(),h(is.$$.fragment),yl=e(),Ms=p("p"),Ms.innerHTML=ha,gl=e(),cs=p("p"),cs.innerHTML=ra,wl=e(),h(hs.$$.fragment),fl=e(),rs=p("p"),rs.innerHTML=da,Jl=e(),h(ds.$$.fragment),bl=e(),os=p("p"),os.textContent=oa,Tl=e(),js=p("p"),js.innerHTML=ja,Ul=e(),ms=p("p"),ms.textContent=ma,Cl=e(),h(us.$$.fragment),$l=e(),ys=p("p"),ys.innerHTML=ua,Zl=e(),gs=p("p"),gs.innerHTML=ya,Bl=e(),h(ws.$$.fragment),El=e(),fs=p("p"),fs.textContent=ga,xl=e(),h(Js.$$.fragment),Il=e(),h(bs.$$.fragment),Gl=e(),Ts=p("p"),Ts.innerHTML=wa,_l=e(),h(U.$$.fragment),Rl=e(),h(Us.$$.fragment),Xl=e(),Cs=p("p"),Cs.innerHTML=fa,kl=e(),h($s.$$.fragment),vl=e(),Zs=p("p"),Zs.innerHTML=Ja,Al=e(),h(Bs.$$.fragment),Yl=e(),Es=p("p"),Es.innerHTML=ba,Wl=e(),h(xs.$$.fragment),Nl=e(),h(Is.$$.fragment),Ql=e(),Gs=p("p"),this.h()},l(s){const l=Ga("svelte-u9bgzb",document.head);c=i(l,"META",{name:!0,content:!0}),l.forEach(a),g=n(s),u=i(s,"P",{}),$a(u).forEach(a),w=n(s),r(C.$$.fragment,s),_s=n(s),$=i(s,"P",{"data-svelte-h":!0}),M($)!=="svelte-sb4v4f"&&($.innerHTML=Hl),Rs=n(s),r(b.$$.fragment,s),Xs=n(s),r(Z.$$.fragment,s),ks=n(s),B=i(s,"P",{"data-svelte-h":!0}),M(B)!=="svelte-j0kpof"&&(B.innerHTML=Ll),vs=n(s),r(E.$$.fragment,s),As=n(s),x=i(s,"P",{"data-svelte-h":!0}),M(x)!=="svelte-10yvqaf"&&(x.textContent=zl),Ys=n(s),I=i(s,"UL",{"data-svelte-h":!0}),M(I)!=="svelte-1yfiaao"&&(I.innerHTML=ql),Ws=n(s),r(G.$$.fragment,s),Ns=n(s),r(_.$$.fragment,s),Qs=n(s),R=i(s,"P",{"data-svelte-h":!0}),M(R)!=="svelte-17iybkb"&&(R.innerHTML=Pl),Fs=n(s),r(X.$$.fragment,s),Ss=n(s),k=i(s,"P",{"data-svelte-h":!0}),M(k)!=="svelte-1i1nzes"&&(k.textContent=Dl),Vs=n(s),v=i(s,"UL",{"data-svelte-h":!0}),M(v)!=="svelte-1x1j9u0"&&(v.innerHTML=Kl),Hs=n(s),r(A.$$.fragment,s),Ls=n(s),Y=i(s,"P",{"data-svelte-h":!0}),M(Y)!=="svelte-azweip"&&(Y.textContent=Ol),zs=n(s),r(W.$$.fragment,s),qs=n(s),r(N.$$.fragment,s),Ps=n(s),Q=i(s,"P",{"data-svelte-h":!0}),M(Q)!=="svelte-w5ezj2"&&(Q.innerHTML=sa),Ds=n(s),r(F.$$.fragment,s),Ks=n(s),S=i(s,"P",{"data-svelte-h":!0}),M(S)!=="svelte-186asy8"&&(S.textContent=la),Os=n(s),r(V.$$.fragment,s),sl=n(s),H=i(s,"P",{"data-svelte-h":!0}),M(H)!=="svelte-1uu9tt7"&&(H.textContent=aa),ll=n(s),r(L.$$.fragment,s),al=n(s),z=i(s,"P",{"data-svelte-h":!0}),M(z)!=="svelte-1pjyyfy"&&(z.textContent=ta),tl=n(s),r(q.$$.fragment,s),el=n(s),P=i(s,"P",{"data-svelte-h":!0}),M(P)!=="svelte-1rbw0wc"&&(P.innerHTML=ea),nl=n(s),r(D.$$.fragment,s),pl=n(s),K=i(s,"P",{"data-svelte-h":!0}),M(K)!=="svelte-bhtooo"&&(K.innerHTML=na),il=n(s),r(T.$$.fragment,s),Ml=n(s),r(O.$$.fragment,s),cl=n(s),r(ss.$$.fragment,s),hl=n(s),ls=i(s,"P",{"data-svelte-h":!0}),M(ls)!=="svelte-y2mzzz"&&(ls.innerHTML=pa),rl=n(s),as=i(s,"P",{"data-svelte-h":!0}),M(as)!=="svelte-4nym2l"&&(as.textContent=ia),dl=n(s),r(ts.$$.fragment,s),ol=n(s),es=i(s,"P",{"data-svelte-h":!0}),M(es)!=="svelte-m495as"&&(es.textContent=Ma),jl=n(s),r(ns.$$.fragment,s),ml=n(s),ps=i(s,"P",{"data-svelte-h":!0}),M(ps)!=="svelte-17rhkin"&&(ps.textContent=ca),ul=n(s),r(is.$$.fragment,s),yl=n(s),Ms=i(s,"P",{"data-svelte-h":!0}),M(Ms)!=="svelte-1ecq7w8"&&(Ms.innerHTML=ha),gl=n(s),cs=i(s,"P",{"data-svelte-h":!0}),M(cs)!=="svelte-1wkut12"&&(cs.innerHTML=ra),wl=n(s),r(hs.$$.fragment,s),fl=n(s),rs=i(s,"P",{"data-svelte-h":!0}),M(rs)!=="svelte-bvjuqo"&&(rs.innerHTML=da),Jl=n(s),r(ds.$$.fragment,s),bl=n(s),os=i(s,"P",{"data-svelte-h":!0}),M(os)!=="svelte-1r8ornf"&&(os.textContent=oa),Tl=n(s),js=i(s,"P",{"data-svelte-h":!0}),M(js)!=="svelte-1k83g63"&&(js.innerHTML=ja),Ul=n(s),ms=i(s,"P",{"data-svelte-h":!0}),M(ms)!=="svelte-1myl3lm"&&(ms.textContent=ma),Cl=n(s),r(us.$$.fragment,s),$l=n(s),ys=i(s,"P",{"data-svelte-h":!0}),M(ys)!=="svelte-1tsl7te"&&(ys.innerHTML=ua),Zl=n(s),gs=i(s,"P",{"data-svelte-h":!0}),M(gs)!=="svelte-jfkfc6"&&(gs.innerHTML=ya),Bl=n(s),r(ws.$$.fragment,s),El=n(s),fs=i(s,"P",{"data-svelte-h":!0}),M(fs)!=="svelte-1qf6a5n"&&(fs.textContent=ga),xl=n(s),r(Js.$$.fragment,s),Il=n(s),r(bs.$$.fragment,s),Gl=n(s),Ts=i(s,"P",{"data-svelte-h":!0}),M(Ts)!=="svelte-c8yu4v"&&(Ts.innerHTML=wa),_l=n(s),r(U.$$.fragment,s),Rl=n(s),r(Us.$$.fragment,s),Xl=n(s),Cs=i(s,"P",{"data-svelte-h":!0}),M(Cs)!=="svelte-ejf86q"&&(Cs.innerHTML=fa),kl=n(s),r($s.$$.fragment,s),vl=n(s),Zs=i(s,"P",{"data-svelte-h":!0}),M(Zs)!=="svelte-1k9vy6l"&&(Zs.innerHTML=Ja),Al=n(s),r(Bs.$$.fragment,s),Yl=n(s),Es=i(s,"P",{"data-svelte-h":!0}),M(Es)!=="svelte-12f1f8r"&&(Es.innerHTML=ba),Wl=n(s),r(xs.$$.fragment,s),Nl=n(s),r(Is.$$.fragment,s),Ql=n(s),Gs=i(s,"P",{}),$a(Gs).forEach(a),this.h()},h(){Za(c,"name","hf:doc:metadata"),Za(c,"content",Ya)},m(s,l){_a(document.head,c),t(s,g,l),t(s,u,l),t(s,w,l),d(C,s,l),t(s,_s,l),t(s,$,l),t(s,Rs,l),d(b,s,l),t(s,Xs,l),d(Z,s,l),t(s,ks,l),t(s,B,l),t(s,vs,l),d(E,s,l),t(s,As,l),t(s,x,l),t(s,Ys,l),t(s,I,l),t(s,Ws,l),d(G,s,l),t(s,Ns,l),d(_,s,l),t(s,Qs,l),t(s,R,l),t(s,Fs,l),d(X,s,l),t(s,Ss,l),t(s,k,l),t(s,Vs,l),t(s,v,l),t(s,Hs,l),d(A,s,l),t(s,Ls,l),t(s,Y,l),t(s,zs,l),d(W,s,l),t(s,qs,l),d(N,s,l),t(s,Ps,l),t(s,Q,l),t(s,Ds,l),d(F,s,l),t(s,Ks,l),t(s,S,l),t(s,Os,l),d(V,s,l),t(s,sl,l),t(s,H,l),t(s,ll,l),d(L,s,l),t(s,al,l),t(s,z,l),t(s,tl,l),d(q,s,l),t(s,el,l),t(s,P,l),t(s,nl,l),d(D,s,l),t(s,pl,l),t(s,K,l),t(s,il,l),d(T,s,l),t(s,Ml,l),d(O,s,l),t(s,cl,l),d(ss,s,l),t(s,hl,l),t(s,ls,l),t(s,rl,l),t(s,as,l),t(s,dl,l),d(ts,s,l),t(s,ol,l),t(s,es,l),t(s,jl,l),d(ns,s,l),t(s,ml,l),t(s,ps,l),t(s,ul,l),d(is,s,l),t(s,yl,l),t(s,Ms,l),t(s,gl,l),t(s,cs,l),t(s,wl,l),d(hs,s,l),t(s,fl,l),t(s,rs,l),t(s,Jl,l),d(ds,s,l),t(s,bl,l),t(s,os,l),t(s,Tl,l),t(s,js,l),t(s,Ul,l),t(s,ms,l),t(s,Cl,l),d(us,s,l),t(s,$l,l),t(s,ys,l),t(s,Zl,l),t(s,gs,l),t(s,Bl,l),d(ws,s,l),t(s,El,l),t(s,fs,l),t(s,xl,l),d(Js,s,l),t(s,Il,l),d(bs,s,l),t(s,Gl,l),t(s,Ts,l),t(s,_l,l),d(U,s,l),t(s,Rl,l),d(Us,s,l),t(s,Xl,l),t(s,Cs,l),t(s,kl,l),d($s,s,l),t(s,vl,l),t(s,Zs,l),t(s,Al,l),d(Bs,s,l),t(s,Yl,l),t(s,Es,l),t(s,Wl,l),d(xs,s,l),t(s,Nl,l),d(Is,s,l),t(s,Ql,l),t(s,Gs,l),Fl=!0},p(s,[l]){const Ta={};l&2&&(Ta.$$scope={dirty:l,ctx:s}),b.$set(Ta);const Ua={};l&2&&(Ua.$$scope={dirty:l,ctx:s}),T.$set(Ua);const Ca={};l&2&&(Ca.$$scope={dirty:l,ctx:s}),U.$set(Ca)},i(s){Fl||(o(C.$$.fragment,s),o(b.$$.fragment,s),o(Z.$$.fragment,s),o(E.$$.fragment,s),o(G.$$.fragment,s),o(_.$$.fragment,s),o(X.$$.fragment,s),o(A.$$.fragment,s),o(W.$$.fragment,s),o(N.$$.fragment,s),o(F.$$.fragment,s),o(V.$$.fragment,s),o(L.$$.fragment,s),o(q.$$.fragment,s),o(D.$$.fragment,s),o(T.$$.fragment,s),o(O.$$.fragment,s),o(ss.$$.fragment,s),o(ts.$$.fragment,s),o(ns.$$.fragment,s),o(is.$$.fragment,s),o(hs.$$.fragment,s),o(ds.$$.fragment,s),o(us.$$.fragment,s),o(ws.$$.fragment,s),o(Js.$$.fragment,s),o(bs.$$.fragment,s),o(U.$$.fragment,s),o(Us.$$.fragment,s),o($s.$$.fragment,s),o(Bs.$$.fragment,s),o(xs.$$.fragment,s),o(Is.$$.fragment,s),Fl=!0)},o(s){j(C.$$.fragment,s),j(b.$$.fragment,s),j(Z.$$.fragment,s),j(E.$$.fragment,s),j(G.$$.fragment,s),j(_.$$.fragment,s),j(X.$$.fragment,s),j(A.$$.fragment,s),j(W.$$.fragment,s),j(N.$$.fragment,s),j(F.$$.fragment,s),j(V.$$.fragment,s),j(L.$$.fragment,s),j(q.$$.fragment,s),j(D.$$.fragment,s),j(T.$$.fragment,s),j(O.$$.fragment,s),j(ss.$$.fragment,s),j(ts.$$.fragment,s),j(ns.$$.fragment,s),j(is.$$.fragment,s),j(hs.$$.fragment,s),j(ds.$$.fragment,s),j(us.$$.fragment,s),j(ws.$$.fragment,s),j(Js.$$.fragment,s),j(bs.$$.fragment,s),j(U.$$.fragment,s),j(Us.$$.fragment,s),j($s.$$.fragment,s),j(Bs.$$.fragment,s),j(xs.$$.fragment,s),j(Is.$$.fragment,s),Fl=!1},d(s){s&&(a(g),a(u),a(w),a(_s),a($),a(Rs),a(Xs),a(ks),a(B),a(vs),a(As),a(x),a(Ys),a(I),a(Ws),a(Ns),a(Qs),a(R),a(Fs),a(Ss),a(k),a(Vs),a(v),a(Hs),a(Ls),a(Y),a(zs),a(qs),a(Ps),a(Q),a(Ds),a(Ks),a(S),a(Os),a(sl),a(H),a(ll),a(al),a(z),a(tl),a(el),a(P),a(nl),a(pl),a(K),a(il),a(Ml),a(cl),a(hl),a(ls),a(rl),a(as),a(dl),a(ol),a(es),a(jl),a(ml),a(ps),a(ul),a(yl),a(Ms),a(gl),a(cs),a(wl),a(fl),a(rs),a(Jl),a(bl),a(os),a(Tl),a(js),a(Ul),a(ms),a(Cl),a($l),a(ys),a(Zl),a(gs),a(Bl),a(El),a(fs),a(xl),a(Il),a(Gl),a(Ts),a(_l),a(Rl),a(Xl),a(Cs),a(kl),a(vl),a(Zs),a(Al),a(Yl),a(Es),a(Wl),a(Nl),a(Ql),a(Gs)),a(c),m(C,s),m(b,s),m(Z,s),m(E,s),m(G,s),m(_,s),m(X,s),m(A,s),m(W,s),m(N,s),m(F,s),m(V,s),m(L,s),m(q,s),m(D,s),m(T,s),m(O,s),m(ss,s),m(ts,s),m(ns,s),m(is,s),m(hs,s),m(ds,s),m(us,s),m(ws,s),m(Js,s),m(bs,s),m(U,s),m(Us,s),m($s,s),m(Bs,s),m(xs,s),m(Is,s)}}}const Ya='{"title":"Create and share Model Cards","local":"create-and-share-model-cards","sections":[{"title":"Load a Model Card from the Hub","local":"load-a-model-card-from-the-hub","sections":[],"depth":2},{"title":"Create Model Cards","local":"create-model-cards","sections":[{"title":"From Text","local":"from-text","sections":[],"depth":3},{"title":"From a Jinja Template","local":"from-a-jinja-template","sections":[],"depth":3},{"title":"From the Default Template","local":"from-the-default-template","sections":[],"depth":3}],"depth":2},{"title":"Share Model Cards","local":"share-model-cards","sections":[],"depth":2},{"title":"Update metadata","local":"update-metadata","sections":[],"depth":2},{"title":"Include Evaluation Results","local":"include-evaluation-results","sections":[],"depth":2}],"depth":1}';function Wa(J){return Ea(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ha extends xa{constructor(c){super(),Ia(this,c,Wa,Aa,Ba,{})}}export{Ha as component};
