import{s as ml,o as fl,n as Ze}from"../chunks/scheduler.18a86fab.js";import{S as pl,i as ul,g as u,s as o,r as $,A as cl,h as c,f as l,c as r,j as ol,u as b,x as d,k as _e,y as dl,a as s,v as y,d as g,t as T,w as M}from"../chunks/index.98837b22.js";import{Y as rl}from"../chunks/Youtube.14fb207c.js";import{C as H}from"../chunks/CodeBlock.8d0c2e8a.js";import{H as k}from"../chunks/Heading.7e7e0c5b.js";import{H as il,a as Ce}from"../chunks/HfOption.6641485e.js";import{E as hl}from"../chunks/index.499f366c.js";function $l(v){let n,h;return n=new H({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:"huggingface-cli login",wrap:!1}}),{c(){$(n.$$.fragment)},l(i){b(n.$$.fragment,i)},m(i,p){y(n,i,p),h=!0},p:Ze,i(i){h||(g(n.$$.fragment,i),h=!0)},o(i){T(n.$$.fragment,i),h=!1},d(i){M(n,i)}}}function bl(v){let n,h;return n=new H({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG5vdGVib29rX2xvZ2luJTBBJTBBbm90ZWJvb2tfbG9naW4oKQ==",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login

notebook_login()`,wrap:!1}}),{c(){$(n.$$.fragment)},l(i){b(n.$$.fragment,i)},m(i,p){y(n,i,p),h=!0},p:Ze,i(i){h||(g(n.$$.fragment,i),h=!0)},o(i){T(n.$$.fragment,i),h=!1},d(i){M(n,i)}}}function yl(v){let n,h,i,p;return n=new Ce({props:{id:"share",option:"huggingface-CLI",$$slots:{default:[$l]},$$scope:{ctx:v}}}),i=new Ce({props:{id:"share",option:"notebook",$$slots:{default:[bl]},$$scope:{ctx:v}}}),{c(){$(n.$$.fragment),h=o(),$(i.$$.fragment)},l(m){b(n.$$.fragment,m),h=r(m),b(i.$$.fragment,m)},m(m,a){y(n,m,a),s(m,h,a),y(i,m,a),p=!0},p(m,a){const f={};a&2&&(f.$$scope={dirty:a,ctx:m}),n.$set(f);const w={};a&2&&(w.$$scope={dirty:a,ctx:m}),i.$set(w)},i(m){p||(g(n.$$.fragment,m),g(i.$$.fragment,m),p=!0)},o(m){T(n.$$.fragment,m),T(i.$$.fragment,m),p=!1},d(m){m&&l(h),M(n,m),M(i,m)}}}function gl(v){let n,h="Set <code>from_tf=True</code> to convert a checkpoint from TensorFlow to PyTorch and then save it.",i,p,m;return p=new H({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpc3RpbEJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBcHRfbW9kZWwlMjAlM0QlMjBEaXN0aWxCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIycGF0aCUyRnRvJTJGYXdlc29tZS1uYW1lLXlvdS1waWNrZWQlMjIlMkMlMjBmcm9tX3RmJTNEVHJ1ZSklMEFwdF9tb2RlbC5zYXZlX3ByZXRyYWluZWQoJTIycGF0aCUyRnRvJTJGYXdlc29tZS1uYW1lLXlvdS1waWNrZWQlMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DistilBertForSequenceClassification

pt_model = DistilBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;path/to/awesome-name-you-picked&quot;</span>, from_tf=<span class="hljs-literal">True</span>)
pt_model.save_pretrained(<span class="hljs-string">&quot;path/to/awesome-name-you-picked&quot;</span>)`,wrap:!1}}),{c(){n=u("p"),n.innerHTML=h,i=o(),$(p.$$.fragment)},l(a){n=c(a,"P",{"data-svelte-h":!0}),d(n)!=="svelte-mmf8gx"&&(n.innerHTML=h),i=r(a),b(p.$$.fragment,a)},m(a,f){s(a,n,f),s(a,i,f),y(p,a,f),m=!0},p:Ze,i(a){m||(g(p.$$.fragment,a),m=!0)},o(a){T(p.$$.fragment,a),m=!1},d(a){a&&(l(n),l(i)),M(p,a)}}}function Tl(v){let n,h="Set <code>from_pt=True</code> to convert a checkpoint from PyTorch to TensorFlow and then save it.",i,p,m;return p=new H({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGRGlzdGlsQmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0Zl9tb2RlbCUyMCUzRCUyMFRGRGlzdGlsQmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnBhdGglMkZ0byUyRmF3ZXNvbWUtbmFtZS15b3UtcGlja2VkJTIyJTJDJTIwZnJvbV9wdCUzRFRydWUpJTBBdGZfbW9kZWwuc2F2ZV9wcmV0cmFpbmVkKCUyMnBhdGglMkZ0byUyRmF3ZXNvbWUtbmFtZS15b3UtcGlja2VkJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFDistilBertForSequenceClassification

tf_model = TFDistilBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;path/to/awesome-name-you-picked&quot;</span>, from_pt=<span class="hljs-literal">True</span>)
tf_model.save_pretrained(<span class="hljs-string">&quot;path/to/awesome-name-you-picked&quot;</span>)`,wrap:!1}}),{c(){n=u("p"),n.innerHTML=h,i=o(),$(p.$$.fragment)},l(a){n=c(a,"P",{"data-svelte-h":!0}),d(n)!=="svelte-1gbujd3"&&(n.innerHTML=h),i=r(a),b(p.$$.fragment,a)},m(a,f){s(a,n,f),s(a,i,f),y(p,a,f),m=!0},p:Ze,i(a){m||(g(p.$$.fragment,a),m=!0)},o(a){T(p.$$.fragment,a),m=!1},d(a){a&&(l(n),l(i)),M(p,a)}}}function Ml(v){let n,h="Set <code>from_pt=True</code> to convert a checkpoint from PyTorch to Flax and then save it.",i,p,m;return p=new H({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEZsYXhEaXN0aWxCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQWZsYXhfbW9kZWwlMjAlM0QlMjBGbGF4RGlzdGlsQmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnBhdGglMkZ0byUyRmF3ZXNvbWUtbmFtZS15b3UtcGlja2VkJTIyJTJDJTIwZnJvbV9wdCUzRFRydWUlMEEpJTBBZmxheF9tb2RlbC5zYXZlX3ByZXRyYWluZWQoJTIycGF0aCUyRnRvJTJGYXdlc29tZS1uYW1lLXlvdS1waWNrZWQlMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> FlaxDistilBertForSequenceClassification
flax_model = FlaxDistilBertForSequenceClassification.from_pretrained(
    <span class="hljs-string">&quot;path/to/awesome-name-you-picked&quot;</span>, from_pt=<span class="hljs-literal">True</span>
)
flax_model.save_pretrained(<span class="hljs-string">&quot;path/to/awesome-name-you-picked&quot;</span>)`,wrap:!1}}),{c(){n=u("p"),n.innerHTML=h,i=o(),$(p.$$.fragment)},l(a){n=c(a,"P",{"data-svelte-h":!0}),d(n)!=="svelte-1lhc9mx"&&(n.innerHTML=h),i=r(a),b(p.$$.fragment,a)},m(a,f){s(a,n,f),s(a,i,f),y(p,a,f),m=!0},p:Ze,i(a){m||(g(p.$$.fragment,a),m=!0)},o(a){T(p.$$.fragment,a),m=!1},d(a){a&&(l(n),l(i)),M(p,a)}}}function wl(v){let n,h,i,p,m,a;return n=new Ce({props:{id:"convert",option:"PyTorch",$$slots:{default:[gl]},$$scope:{ctx:v}}}),i=new Ce({props:{id:"convert",option:"TensorFlow",$$slots:{default:[Tl]},$$scope:{ctx:v}}}),m=new Ce({props:{id:"convert",option:"Flax",$$slots:{default:[Ml]},$$scope:{ctx:v}}}),{c(){$(n.$$.fragment),h=o(),$(i.$$.fragment),p=o(),$(m.$$.fragment)},l(f){b(n.$$.fragment,f),h=r(f),b(i.$$.fragment,f),p=r(f),b(m.$$.fragment,f)},m(f,w){y(n,f,w),s(f,h,w),y(i,f,w),s(f,p,w),y(m,f,w),a=!0},p(f,w){const j={};w&2&&(j.$$scope={dirty:w,ctx:f}),n.$set(j);const _={};w&2&&(_.$$scope={dirty:w,ctx:f}),i.$set(_);const ke={};w&2&&(ke.$$scope={dirty:w,ctx:f}),m.$set(ke)},i(f){a||(g(n.$$.fragment,f),g(i.$$.fragment,f),g(m.$$.fragment,f),a=!0)},o(f){T(n.$$.fragment,f),T(i.$$.fragment,f),T(m.$$.fragment,f),a=!1},d(f){f&&(l(h),l(p)),M(n,f),M(i,f),M(m,f)}}}function vl(v){let n,h,i,p,m,a,f,w='The Hugging Face <a href="https://hf.co/models" rel="nofollow">Hub</a> is a platform for sharing, discovering, and consuming models of all different types and sizes. We highly recommend sharing your model on the Hub to push open-source machine learning forward for everyone!',j,_,ke="This guide will show you how to share a model to the Hub from Transformers.",We,G,Je,L,Ct='To share a model to the Hub, you need a Hugging Face <a href="https://hf.co/join" rel="nofollow">account</a>. Create a <a href="https://hf.co/docs/hub/security-tokens#user-access-tokens" rel="nofollow">User Access Token</a> (stored in the <a href="./installation#cache-directory">cache</a> by default) and login to your account from either the command line or notebook.',Ue,C,xe,R,Fe,X,je,V,Zt="Each model repository features versioning, commit history, and diff visualization.",Ge,Z,Wt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/vis_diff.png"/>',Le,Y,Jt='Versioning is based on <a href="https://git-scm.com/" rel="nofollow">Git</a> and <a href="https://git-lfs.github.com/" rel="nofollow">Git Large File Storage (LFS)</a>, and it enables revisions, a way to specify a model version with a commit hash, tag or branch.',Re,P,Ut='For example, use the <code>revision</code> parameter in <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> to load a specific model version from a commit hash.',Xe,B,Ve,E,xt='Model repositories also support <a href="https://hf.co/docs/hub/models-gated" rel="nofollow">gating</a> to control who can access a model. Gating is common for allowing a select group of users to preview a research model before it’s made public.',Ye,W,Ft='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/gated-model.png"/>',Pe,S,jt='A model repository also includes an inference <a href="https://hf.co/docs/hub/models-widgets" rel="nofollow">widget</a> for users to directly interact with a model on the Hub.',Be,N,Gt='Check out the Hub <a href="https://hf.co/docs/hub/models" rel="nofollow">Models</a> documentation to for more information.',Ee,z,Se,I,Lt="Reach a wider audience by making a model available in PyTorch, TensorFlow, and Flax. While users can still load a model if they’re using a different framework, it is slower because Transformers needs to convert the checkpoint on the fly. It is faster to convert the checkpoint first.",Ne,J,ze,Q,Ie,q,Rt='There are several ways to upload a model to the Hub depending on your workflow preference. You can push a model with <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, a callback for TensorFlow models, call <a href="/docs/transformers/main/en/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> directly on a model, or use the Hub web interface.',Qe,A,qe,D,Ae,K,Xt='<a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> can push a model directly to the Hub after training. Set <code>push_to_hub=True</code> in <a href="/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a> and pass it to <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>. Once training is complete, call <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.push_to_hub">push_to_hub()</a> to upload the model.',De,O,Vt='<a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.push_to_hub">push_to_hub()</a> automatically adds useful information like training hyperparameters and results to the model card.',Ke,ee,Oe,te,et,le,Yt='For TensorFlow models, add the <a href="/docs/transformers/main/en/main_classes/keras_callbacks#transformers.PushToHubCallback">PushToHubCallback</a> to the <a href="https://keras.io/api/models/model_training_apis/#fit-method" rel="nofollow">fit</a> method.',tt,se,lt,ne,st,ae,Pt='The <a href="/docs/transformers/main/en/main_classes/model#transformers.utils.PushToHubMixin">PushToHubMixin</a> provides functionality for pushing a model or tokenizer to the Hub.',nt,oe,Bt='Call <a href="/docs/transformers/main/en/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> directly on a model to upload it to the Hub. It creates a repository under your namespace with the model name specified in <a href="/docs/transformers/main/en/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a>.',at,re,ot,ie,Et="Other objects like a tokenizer or TensorFlow model are also pushed to the Hub in the same way.",rt,me,it,fe,St="Your Hugging Face profile should now display the newly created model repository. Navigate to the <strong>Files</strong> tab to see all the uploaded files.",mt,pe,Nt='Refer to the <a href="https://hf.co/docs/hub/how-to-upstream" rel="nofollow">Upload files to the Hub</a> guide for more information about pushing files to the Hub.',ft,ue,pt,ce,zt="The Hub web interface is a no-code approach for uploading a model.",ut,de,It='<li>Create a new repository by selecting <a href="https://huggingface.co/new" rel="nofollow"><strong>New Model</strong></a>.</li>',ct,U,Qt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/new_model_repo.png"/>',dt,he,qt="Add some information about your model:",ht,$e,At="<li>Select the <strong>owner</strong> of the repository. This can be yourself or any of the organizations you belong to.</li> <li>Pick a name for your model, which will also be the repository name.</li> <li>Choose whether your model is public or private.</li> <li>Set the license usage.</li>",$t,x,Dt="<li><p>Click on <strong>Create model</strong> to create the model repository.</p></li> <li><p>Select the <strong>Files</strong> tab and click on the <strong>Add file</strong> button to drag-and-drop a file to your repository. Add a commit message and click on <strong>Commit changes to main</strong> to commit the file.</p></li>",bt,F,Kt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/upload_file.png"/>',yt,be,gt,ye,Ot='<a href="https://hf.co/docs/hub/model-cards#model-cards" rel="nofollow">Model cards</a> inform users about a models performance, limitations, potential biases, and ethical considerations. It is highly recommended to add a model card to your repository!',Tt,ge,el="A model card is a <code>README.md</code> file in your repository. Add this file by:",Mt,Te,tl="<li>manually creating and uploading a <code>README.md</code> file</li> <li>clicking on the <strong>Edit model card</strong> button in the repository</li>",wt,Me,ll='Take a look at the Llama 3.1 <a href="https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct" rel="nofollow">model card</a> for an example of what to include on a model card.',vt,we,sl='Learn more about other model card metadata (carbon emissions, license, link to paper, etc.) available in the <a href="https://hf.co/docs/hub/model-cards#model-cards" rel="nofollow">Model Cards</a> guide.',_t,ve,kt,He,Ht;return m=new k({props:{title:"Sharing",local:"sharing",headingTag:"h1"}}),G=new k({props:{title:"Set up",local:"set-up",headingTag:"h2"}}),C=new il({props:{id:"share",options:["huggingface-CLI","notebook"],$$slots:{default:[yl]},$$scope:{ctx:v}}}),R=new k({props:{title:"Repository features",local:"repository-features",headingTag:"h2"}}),X=new rl({props:{id:"XvSGPZFEjDY"}}),B=new H({props:{code:"bW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmp1bGllbi1jJTJGRXNwZXJCRVJUby1zbWFsbCUyMiUyQyUyMHJldmlzaW9uJTNEJTIyNGM3Nzk4MiUyMiUwQSk=",highlighted:`model = AutoModel.from_pretrained(
    <span class="hljs-string">&quot;julien-c/EsperBERTo-small&quot;</span>, revision=<span class="hljs-string">&quot;4c77982&quot;</span>
)`,wrap:!1}}),z=new k({props:{title:"Model framework conversion",local:"model-framework-conversion",headingTag:"h2"}}),J=new il({props:{id:"convert",options:["PyTorch","TensorFlow","Flax"],$$slots:{default:[wl]},$$scope:{ctx:v}}}),Q=new k({props:{title:"Uploading a model",local:"uploading-a-model",headingTag:"h2"}}),A=new rl({props:{id:"Z1-XMy-GNLQ"}}),D=new k({props:{title:"Trainer",local:"trainer",headingTag:"h3"}}),ee=new H({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTJDJTIwVHJhaW5lciUwQSUwQXRyYWluaW5nX2FyZ3MlMjAlM0QlMjBUcmFpbmluZ0FyZ3VtZW50cyhvdXRwdXRfZGlyJTNEJTIybXktYXdlc29tZS1tb2RlbCUyMiUyQyUyMHB1c2hfdG9faHViJTNEVHJ1ZSklMEF0cmFpbmVyJTIwJTNEJTIwVHJhaW5lciglMEElMjAlMjAlMjAlMjBtb2RlbCUzRG1vZGVsJTJDJTBBJTIwJTIwJTIwJTIwYXJncyUzRHRyYWluaW5nX2FyZ3MlMkMlMEElMjAlMjAlMjAlMjB0cmFpbl9kYXRhc2V0JTNEc21hbGxfdHJhaW5fZGF0YXNldCUyQyUwQSUyMCUyMCUyMCUyMGV2YWxfZGF0YXNldCUzRHNtYWxsX2V2YWxfZGF0YXNldCUyQyUwQSUyMCUyMCUyMCUyMGNvbXB1dGVfbWV0cmljcyUzRGNvbXB1dGVfbWV0cmljcyUyQyUwQSklMEF0cmFpbmVyLnB1c2hfdG9faHViKCk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments, Trainer

training_args = TrainingArguments(output_dir=<span class="hljs-string">&quot;my-awesome-model&quot;</span>, push_to_hub=<span class="hljs-literal">True</span>)
trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=small_train_dataset,
    eval_dataset=small_eval_dataset,
    compute_metrics=compute_metrics,
)
trainer.push_to_hub()`,wrap:!1}}),te=new k({props:{title:"PushToHubCallback",local:"pushtohubcallback",headingTag:"h3"}}),se=new H({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFB1c2hUb0h1YkNhbGxiYWNrJTBBJTBBcHVzaF90b19odWJfY2FsbGJhY2slMjAlM0QlMjBQdXNoVG9IdWJDYWxsYmFjayglMEElMjAlMjAlMjAlMjBvdXRwdXRfZGlyJTNEJTIyLiUyRnlvdXJfbW9kZWxfc2F2ZV9wYXRoJTIyJTJDJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyJTJDJTIwaHViX21vZGVsX2lkJTNEJTIyeW91ci11c2VybmFtZSUyRm15LWF3ZXNvbWUtbW9kZWwlMjIlMEEpJTBBbW9kZWwuZml0KHRmX3RyYWluX2RhdGFzZXQlMkMlMjB2YWxpZGF0aW9uX2RhdGElM0R0Zl92YWxpZGF0aW9uX2RhdGFzZXQlMkMlMjBlcG9jaHMlM0QzJTJDJTIwY2FsbGJhY2tzJTNEcHVzaF90b19odWJfY2FsbGJhY2sp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PushToHubCallback

push_to_hub_callback = PushToHubCallback(
    output_dir=<span class="hljs-string">&quot;./your_model_save_path&quot;</span>, tokenizer=tokenizer, hub_model_id=<span class="hljs-string">&quot;your-username/my-awesome-model&quot;</span>
)
model.fit(tf_train_dataset, validation_data=tf_validation_dataset, epochs=<span class="hljs-number">3</span>, callbacks=push_to_hub_callback)`,wrap:!1}}),ne=new k({props:{title:"PushToHubMixin",local:"pushtohubmixin",headingTag:"h3"}}),re=new H({props:{code:"bW9kZWwucHVzaF90b19odWIoJTIybXktYXdlc29tZS1tb2RlbCUyMik=",highlighted:'model.push_to_hub(<span class="hljs-string">&quot;my-awesome-model&quot;</span>)',wrap:!1}}),me=new H({props:{code:"dG9rZW5pemVyLnB1c2hfdG9faHViKCUyMm15LWF3ZXNvbWUtbW9kZWwlMjIp",highlighted:'tokenizer.push_to_hub(<span class="hljs-string">&quot;my-awesome-model&quot;</span>)',wrap:!1}}),ue=new k({props:{title:"Hub web interface",local:"hub-web-interface",headingTag:"h3"}}),be=new k({props:{title:"Model card",local:"model-card",headingTag:"h2"}}),ve=new hl({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_sharing.md"}}),{c(){n=u("meta"),h=o(),i=u("p"),p=o(),$(m.$$.fragment),a=o(),f=u("p"),f.innerHTML=w,j=o(),_=u("p"),_.textContent=ke,We=o(),$(G.$$.fragment),Je=o(),L=u("p"),L.innerHTML=Ct,Ue=o(),$(C.$$.fragment),xe=o(),$(R.$$.fragment),Fe=o(),$(X.$$.fragment),je=o(),V=u("p"),V.textContent=Zt,Ge=o(),Z=u("div"),Z.innerHTML=Wt,Le=o(),Y=u("p"),Y.innerHTML=Jt,Re=o(),P=u("p"),P.innerHTML=Ut,Xe=o(),$(B.$$.fragment),Ve=o(),E=u("p"),E.innerHTML=xt,Ye=o(),W=u("div"),W.innerHTML=Ft,Pe=o(),S=u("p"),S.innerHTML=jt,Be=o(),N=u("p"),N.innerHTML=Gt,Ee=o(),$(z.$$.fragment),Se=o(),I=u("p"),I.textContent=Lt,Ne=o(),$(J.$$.fragment),ze=o(),$(Q.$$.fragment),Ie=o(),q=u("p"),q.innerHTML=Rt,Qe=o(),$(A.$$.fragment),qe=o(),$(D.$$.fragment),Ae=o(),K=u("p"),K.innerHTML=Xt,De=o(),O=u("p"),O.innerHTML=Vt,Ke=o(),$(ee.$$.fragment),Oe=o(),$(te.$$.fragment),et=o(),le=u("p"),le.innerHTML=Yt,tt=o(),$(se.$$.fragment),lt=o(),$(ne.$$.fragment),st=o(),ae=u("p"),ae.innerHTML=Pt,nt=o(),oe=u("p"),oe.innerHTML=Bt,at=o(),$(re.$$.fragment),ot=o(),ie=u("p"),ie.textContent=Et,rt=o(),$(me.$$.fragment),it=o(),fe=u("p"),fe.innerHTML=St,mt=o(),pe=u("p"),pe.innerHTML=Nt,ft=o(),$(ue.$$.fragment),pt=o(),ce=u("p"),ce.textContent=zt,ut=o(),de=u("ol"),de.innerHTML=It,ct=o(),U=u("div"),U.innerHTML=Qt,dt=o(),he=u("p"),he.textContent=qt,ht=o(),$e=u("ul"),$e.innerHTML=At,$t=o(),x=u("ol"),x.innerHTML=Dt,bt=o(),F=u("div"),F.innerHTML=Kt,yt=o(),$(be.$$.fragment),gt=o(),ye=u("p"),ye.innerHTML=Ot,Tt=o(),ge=u("p"),ge.innerHTML=el,Mt=o(),Te=u("ul"),Te.innerHTML=tl,wt=o(),Me=u("p"),Me.innerHTML=ll,vt=o(),we=u("p"),we.innerHTML=sl,_t=o(),$(ve.$$.fragment),kt=o(),He=u("p"),this.h()},l(e){const t=cl("svelte-u9bgzb",document.head);n=c(t,"META",{name:!0,content:!0}),t.forEach(l),h=r(e),i=c(e,"P",{}),ol(i).forEach(l),p=r(e),b(m.$$.fragment,e),a=r(e),f=c(e,"P",{"data-svelte-h":!0}),d(f)!=="svelte-hqexdw"&&(f.innerHTML=w),j=r(e),_=c(e,"P",{"data-svelte-h":!0}),d(_)!=="svelte-cmvl1d"&&(_.textContent=ke),We=r(e),b(G.$$.fragment,e),Je=r(e),L=c(e,"P",{"data-svelte-h":!0}),d(L)!=="svelte-8gcvcl"&&(L.innerHTML=Ct),Ue=r(e),b(C.$$.fragment,e),xe=r(e),b(R.$$.fragment,e),Fe=r(e),b(X.$$.fragment,e),je=r(e),V=c(e,"P",{"data-svelte-h":!0}),d(V)!=="svelte-1nqlwi"&&(V.textContent=Zt),Ge=r(e),Z=c(e,"DIV",{class:!0,"data-svelte-h":!0}),d(Z)!=="svelte-108c3d"&&(Z.innerHTML=Wt),Le=r(e),Y=c(e,"P",{"data-svelte-h":!0}),d(Y)!=="svelte-igo7px"&&(Y.innerHTML=Jt),Re=r(e),P=c(e,"P",{"data-svelte-h":!0}),d(P)!=="svelte-1sta92k"&&(P.innerHTML=Ut),Xe=r(e),b(B.$$.fragment,e),Ve=r(e),E=c(e,"P",{"data-svelte-h":!0}),d(E)!=="svelte-167o59o"&&(E.innerHTML=xt),Ye=r(e),W=c(e,"DIV",{class:!0,"data-svelte-h":!0}),d(W)!=="svelte-1hnk1ub"&&(W.innerHTML=Ft),Pe=r(e),S=c(e,"P",{"data-svelte-h":!0}),d(S)!=="svelte-1xf74aa"&&(S.innerHTML=jt),Be=r(e),N=c(e,"P",{"data-svelte-h":!0}),d(N)!=="svelte-hvsb8k"&&(N.innerHTML=Gt),Ee=r(e),b(z.$$.fragment,e),Se=r(e),I=c(e,"P",{"data-svelte-h":!0}),d(I)!=="svelte-1kr58u0"&&(I.textContent=Lt),Ne=r(e),b(J.$$.fragment,e),ze=r(e),b(Q.$$.fragment,e),Ie=r(e),q=c(e,"P",{"data-svelte-h":!0}),d(q)!=="svelte-3kvb9r"&&(q.innerHTML=Rt),Qe=r(e),b(A.$$.fragment,e),qe=r(e),b(D.$$.fragment,e),Ae=r(e),K=c(e,"P",{"data-svelte-h":!0}),d(K)!=="svelte-1rvew8e"&&(K.innerHTML=Xt),De=r(e),O=c(e,"P",{"data-svelte-h":!0}),d(O)!=="svelte-t5m87m"&&(O.innerHTML=Vt),Ke=r(e),b(ee.$$.fragment,e),Oe=r(e),b(te.$$.fragment,e),et=r(e),le=c(e,"P",{"data-svelte-h":!0}),d(le)!=="svelte-16kfavi"&&(le.innerHTML=Yt),tt=r(e),b(se.$$.fragment,e),lt=r(e),b(ne.$$.fragment,e),st=r(e),ae=c(e,"P",{"data-svelte-h":!0}),d(ae)!=="svelte-k0roqv"&&(ae.innerHTML=Pt),nt=r(e),oe=c(e,"P",{"data-svelte-h":!0}),d(oe)!=="svelte-1d96702"&&(oe.innerHTML=Bt),at=r(e),b(re.$$.fragment,e),ot=r(e),ie=c(e,"P",{"data-svelte-h":!0}),d(ie)!=="svelte-1opzkcs"&&(ie.textContent=Et),rt=r(e),b(me.$$.fragment,e),it=r(e),fe=c(e,"P",{"data-svelte-h":!0}),d(fe)!=="svelte-75dbpj"&&(fe.innerHTML=St),mt=r(e),pe=c(e,"P",{"data-svelte-h":!0}),d(pe)!=="svelte-1e137mj"&&(pe.innerHTML=Nt),ft=r(e),b(ue.$$.fragment,e),pt=r(e),ce=c(e,"P",{"data-svelte-h":!0}),d(ce)!=="svelte-izjvcp"&&(ce.textContent=zt),ut=r(e),de=c(e,"OL",{"data-svelte-h":!0}),d(de)!=="svelte-s9shz4"&&(de.innerHTML=It),ct=r(e),U=c(e,"DIV",{class:!0,"data-svelte-h":!0}),d(U)!=="svelte-1rcwxyg"&&(U.innerHTML=Qt),dt=r(e),he=c(e,"P",{"data-svelte-h":!0}),d(he)!=="svelte-jzpr5u"&&(he.textContent=qt),ht=r(e),$e=c(e,"UL",{"data-svelte-h":!0}),d($e)!=="svelte-13o08vs"&&($e.innerHTML=At),$t=r(e),x=c(e,"OL",{start:!0,"data-svelte-h":!0}),d(x)!=="svelte-11vjk8k"&&(x.innerHTML=Dt),bt=r(e),F=c(e,"DIV",{class:!0,"data-svelte-h":!0}),d(F)!=="svelte-a61pox"&&(F.innerHTML=Kt),yt=r(e),b(be.$$.fragment,e),gt=r(e),ye=c(e,"P",{"data-svelte-h":!0}),d(ye)!=="svelte-1rw16nt"&&(ye.innerHTML=Ot),Tt=r(e),ge=c(e,"P",{"data-svelte-h":!0}),d(ge)!=="svelte-pwzqx9"&&(ge.innerHTML=el),Mt=r(e),Te=c(e,"UL",{"data-svelte-h":!0}),d(Te)!=="svelte-1u4jwyv"&&(Te.innerHTML=tl),wt=r(e),Me=c(e,"P",{"data-svelte-h":!0}),d(Me)!=="svelte-1h89dkv"&&(Me.innerHTML=ll),vt=r(e),we=c(e,"P",{"data-svelte-h":!0}),d(we)!=="svelte-d6tqkv"&&(we.innerHTML=sl),_t=r(e),b(ve.$$.fragment,e),kt=r(e),He=c(e,"P",{}),ol(He).forEach(l),this.h()},h(){_e(n,"name","hf:doc:metadata"),_e(n,"content",_l),_e(Z,"class","flex justify-center"),_e(W,"class","flex justify-center"),_e(U,"class","flex justify-center"),_e(x,"start","2"),_e(F,"class","flex justify-center")},m(e,t){dl(document.head,n),s(e,h,t),s(e,i,t),s(e,p,t),y(m,e,t),s(e,a,t),s(e,f,t),s(e,j,t),s(e,_,t),s(e,We,t),y(G,e,t),s(e,Je,t),s(e,L,t),s(e,Ue,t),y(C,e,t),s(e,xe,t),y(R,e,t),s(e,Fe,t),y(X,e,t),s(e,je,t),s(e,V,t),s(e,Ge,t),s(e,Z,t),s(e,Le,t),s(e,Y,t),s(e,Re,t),s(e,P,t),s(e,Xe,t),y(B,e,t),s(e,Ve,t),s(e,E,t),s(e,Ye,t),s(e,W,t),s(e,Pe,t),s(e,S,t),s(e,Be,t),s(e,N,t),s(e,Ee,t),y(z,e,t),s(e,Se,t),s(e,I,t),s(e,Ne,t),y(J,e,t),s(e,ze,t),y(Q,e,t),s(e,Ie,t),s(e,q,t),s(e,Qe,t),y(A,e,t),s(e,qe,t),y(D,e,t),s(e,Ae,t),s(e,K,t),s(e,De,t),s(e,O,t),s(e,Ke,t),y(ee,e,t),s(e,Oe,t),y(te,e,t),s(e,et,t),s(e,le,t),s(e,tt,t),y(se,e,t),s(e,lt,t),y(ne,e,t),s(e,st,t),s(e,ae,t),s(e,nt,t),s(e,oe,t),s(e,at,t),y(re,e,t),s(e,ot,t),s(e,ie,t),s(e,rt,t),y(me,e,t),s(e,it,t),s(e,fe,t),s(e,mt,t),s(e,pe,t),s(e,ft,t),y(ue,e,t),s(e,pt,t),s(e,ce,t),s(e,ut,t),s(e,de,t),s(e,ct,t),s(e,U,t),s(e,dt,t),s(e,he,t),s(e,ht,t),s(e,$e,t),s(e,$t,t),s(e,x,t),s(e,bt,t),s(e,F,t),s(e,yt,t),y(be,e,t),s(e,gt,t),s(e,ye,t),s(e,Tt,t),s(e,ge,t),s(e,Mt,t),s(e,Te,t),s(e,wt,t),s(e,Me,t),s(e,vt,t),s(e,we,t),s(e,_t,t),y(ve,e,t),s(e,kt,t),s(e,He,t),Ht=!0},p(e,[t]){const nl={};t&2&&(nl.$$scope={dirty:t,ctx:e}),C.$set(nl);const al={};t&2&&(al.$$scope={dirty:t,ctx:e}),J.$set(al)},i(e){Ht||(g(m.$$.fragment,e),g(G.$$.fragment,e),g(C.$$.fragment,e),g(R.$$.fragment,e),g(X.$$.fragment,e),g(B.$$.fragment,e),g(z.$$.fragment,e),g(J.$$.fragment,e),g(Q.$$.fragment,e),g(A.$$.fragment,e),g(D.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(se.$$.fragment,e),g(ne.$$.fragment,e),g(re.$$.fragment,e),g(me.$$.fragment,e),g(ue.$$.fragment,e),g(be.$$.fragment,e),g(ve.$$.fragment,e),Ht=!0)},o(e){T(m.$$.fragment,e),T(G.$$.fragment,e),T(C.$$.fragment,e),T(R.$$.fragment,e),T(X.$$.fragment,e),T(B.$$.fragment,e),T(z.$$.fragment,e),T(J.$$.fragment,e),T(Q.$$.fragment,e),T(A.$$.fragment,e),T(D.$$.fragment,e),T(ee.$$.fragment,e),T(te.$$.fragment,e),T(se.$$.fragment,e),T(ne.$$.fragment,e),T(re.$$.fragment,e),T(me.$$.fragment,e),T(ue.$$.fragment,e),T(be.$$.fragment,e),T(ve.$$.fragment,e),Ht=!1},d(e){e&&(l(h),l(i),l(p),l(a),l(f),l(j),l(_),l(We),l(Je),l(L),l(Ue),l(xe),l(Fe),l(je),l(V),l(Ge),l(Z),l(Le),l(Y),l(Re),l(P),l(Xe),l(Ve),l(E),l(Ye),l(W),l(Pe),l(S),l(Be),l(N),l(Ee),l(Se),l(I),l(Ne),l(ze),l(Ie),l(q),l(Qe),l(qe),l(Ae),l(K),l(De),l(O),l(Ke),l(Oe),l(et),l(le),l(tt),l(lt),l(st),l(ae),l(nt),l(oe),l(at),l(ot),l(ie),l(rt),l(it),l(fe),l(mt),l(pe),l(ft),l(pt),l(ce),l(ut),l(de),l(ct),l(U),l(dt),l(he),l(ht),l($e),l($t),l(x),l(bt),l(F),l(yt),l(gt),l(ye),l(Tt),l(ge),l(Mt),l(Te),l(wt),l(Me),l(vt),l(we),l(_t),l(kt),l(He)),l(n),M(m,e),M(G,e),M(C,e),M(R,e),M(X,e),M(B,e),M(z,e),M(J,e),M(Q,e),M(A,e),M(D,e),M(ee,e),M(te,e),M(se,e),M(ne,e),M(re,e),M(me,e),M(ue,e),M(be,e),M(ve,e)}}}const _l='{"title":"Sharing","local":"sharing","sections":[{"title":"Set up","local":"set-up","sections":[],"depth":2},{"title":"Repository features","local":"repository-features","sections":[],"depth":2},{"title":"Model framework conversion","local":"model-framework-conversion","sections":[],"depth":2},{"title":"Uploading a model","local":"uploading-a-model","sections":[{"title":"Trainer","local":"trainer","sections":[],"depth":3},{"title":"PushToHubCallback","local":"pushtohubcallback","sections":[],"depth":3},{"title":"PushToHubMixin","local":"pushtohubmixin","sections":[],"depth":3},{"title":"Hub web interface","local":"hub-web-interface","sections":[],"depth":3}],"depth":2},{"title":"Model card","local":"model-card","sections":[],"depth":2}],"depth":1}';function kl(v){return fl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fl extends pl{constructor(n){super(),ul(this,n,kl,vl,ml,{})}}export{Fl as component};
