import{s as Ip,o as Np,n as Vp}from"../chunks/scheduler.cc52f4b9.js";import{S as Lp,i as Xp,e as m,s as p,c as y,h as Rp,a,d as l,b as r,f as Bp,g as d,j as f,k as W,l as zp,m as n,n as _,o as c,u as tt,t as b,p as h,q as Yp,r as Ap,v as et}from"../chunks/index.9480bb2b.js";import{T as xp}from"../chunks/Tip.f7b80743.js";import{C as Qp,H as ot,E as Sp}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.52103c90.js";import{Y as Ai}from"../chunks/Youtube.7b12d9e8.js";import{C as U}from"../chunks/CodeBlock.c5404643.js";import{C as Hp}from"../chunks/CourseFloatingBanner.78fb31df.js";import{F as Fp}from"../chunks/FrameworkSwitchCourse.42d12053.js";function Ep($){let i,o;return i=new Hp({props:{chapter:4,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/zh-CN/chapter4/section3_tf.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/zh-CN/chapter4/section3_tf.ipynb"}]}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function Pp($){let i,o;return i=new Hp({props:{chapter:4,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/zh-CN/chapter4/section3_pt.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/zh-CN/chapter4/section3_pt.ipynb"}]}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function qp($){let i,o;return i=new Ai({props:{id:"pUh5cGmNV8Y"}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function Dp($){let i,o;return i=new Ai({props:{id:"Zh0FfmVrKX0"}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function Kp($){let i,o="如果您使用Keras來訓練您的模型，則將其上傳到Hub的最簡單方法是在調用 <strong>model.fit()</strong>  時傳遞<strong>PushToHubCallback</strong>：",s,M,T,u,w="然後，您應該在對<strong>model.fit()</strong>的調用中添加<strong>callbacks=[callback]</strong>。然後，每次將模型保存在命名空間的存儲庫中（此處為每個 epoch）時，回調都會將模型上傳到 Hub。該存儲庫的名稱將類似於您選擇的輸出目錄（此處為<strong>bert-finetuned-mrpc</strong>），但您可以選擇另一個名稱，名稱為<strong>hub_model_id = a_different_name</strong>。",C,v,J="要將您的模型上傳到您所屬的組織，只需將其傳遞給 <strong>hub_model_id = my_organization/my_repo_name</strong> 。",Z;return M=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFB1c2hUb0h1YkNhbGxiYWNrJTBBJTBBY2FsbGJhY2slMjAlM0QlMjBQdXNoVG9IdWJDYWxsYmFjayglMEElMjAlMjAlMjAlMjAlMjJiZXJ0LWZpbmV0dW5lZC1tcnBjJTIyJTJDJTIwc2F2ZV9zdHJhdGVneSUzRCUyMmVwb2NoJTIyJTJDJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PushToHubCallback

callback = PushToHubCallback(
    <span class="hljs-string">&quot;bert-finetuned-mrpc&quot;</span>, save_strategy=<span class="hljs-string">&quot;epoch&quot;</span>, tokenizer=tokenizer
)`,wrap:!1}}),{c(){i=m("p"),i.innerHTML=o,s=p(),y(M.$$.fragment),T=p(),u=m("p"),u.innerHTML=w,C=p(),v=m("p"),v.innerHTML=J},l(g){i=a(g,"P",{"data-svelte-h":!0}),f(i)!=="svelte-1kddlaa"&&(i.innerHTML=o),s=r(g),d(M.$$.fragment,g),T=r(g),u=a(g,"P",{"data-svelte-h":!0}),f(u)!=="svelte-bkkgh9"&&(u.innerHTML=w),C=r(g),v=a(g,"P",{"data-svelte-h":!0}),f(v)!=="svelte-4arcmo"&&(v.innerHTML=J)},m(g,k){n(g,i,k),n(g,s,k),_(M,g,k),n(g,T,k),n(g,u,k),n(g,C,k),n(g,v,k),Z=!0},i(g){Z||(b(M.$$.fragment,g),Z=!0)},o(g){c(M.$$.fragment,g),Z=!1},d(g){g&&(l(i),l(s),l(T),l(u),l(C),l(v)),h(M,g)}}}function Op($){let i,o="如果你玩過 <strong>Trainer</strong> 用於訓練模型的 API，將其上傳到 Hub 的最簡單方法是設置 <strong>push_to_hub=True</strong> 當你定義你的 <strong>TrainingArguments</strong> ：",s,M,T,u,w="你聲明 <strong>trainer.train()</strong> 的時候， 這 <strong>Trainer</strong> 然後每次將您的模型保存到您的命名空間中的存儲庫中時（這裡是每個時代），它將上傳到模型中心。該存儲庫將命名為您選擇的輸出目錄（此處 <strong>bert-finetuned-mrpc</strong> ) 但您可以選擇不同的名稱 <strong>hub_model_id = a_different_name</strong> 。",C,v,J="要將您的模型上傳到您所屬的組織，只需將其傳遞給 <strong>hub_model_id = my_organization/my_repo_name</strong> 。",Z,g,k="訓練結束後，你應該做最後的 <strong>trainer.push_to_hub()</strong> 上傳模型的最新版本。它還將生成包含所有相關元數據的模型卡，報告使用的超參數和評估結果！以下是您可能會在此類模型卡中找到的內容示例：",B,H,mt='<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter4/model_card.png" alt="An example of an auto-generated model card." width="100%"/>',x;return M=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBdHJhaW5pbmdfYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMCUyMmJlcnQtZmluZXR1bmVkLW1ycGMlMjIlMkMlMjBzYXZlX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMjBwdXNoX3RvX2h1YiUzRFRydWUlMEEp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

training_args = TrainingArguments(
    <span class="hljs-string">&quot;bert-finetuned-mrpc&quot;</span>, save_strategy=<span class="hljs-string">&quot;epoch&quot;</span>, push_to_hub=<span class="hljs-literal">True</span>
)`,wrap:!1}}),{c(){i=m("p"),i.innerHTML=o,s=p(),y(M.$$.fragment),T=p(),u=m("p"),u.innerHTML=w,C=p(),v=m("p"),v.innerHTML=J,Z=p(),g=m("p"),g.innerHTML=k,B=p(),H=m("div"),H.innerHTML=mt,this.h()},l(j){i=a(j,"P",{"data-svelte-h":!0}),f(i)!=="svelte-1d8nzk8"&&(i.innerHTML=o),s=r(j),d(M.$$.fragment,j),T=r(j),u=a(j,"P",{"data-svelte-h":!0}),f(u)!=="svelte-zw37cm"&&(u.innerHTML=w),C=r(j),v=a(j,"P",{"data-svelte-h":!0}),f(v)!=="svelte-4arcmo"&&(v.innerHTML=J),Z=r(j),g=a(j,"P",{"data-svelte-h":!0}),f(g)!=="svelte-1ci5fik"&&(g.innerHTML=k),B=r(j),H=a(j,"DIV",{class:!0,"data-svelte-h":!0}),f(H)!=="svelte-1lhrimn"&&(H.innerHTML=mt),this.h()},h(){W(H,"class","flex justify-center")},m(j,G){n(j,i,G),n(j,s,G),_(M,j,G),n(j,T,G),n(j,u,G),n(j,C,G),n(j,v,G),n(j,Z,G),n(j,g,G),n(j,B,G),n(j,H,G),x=!0},i(j){x||(b(M.$$.fragment,j),x=!0)},o(j){c(M.$$.fragment,j),x=!1},d(j){j&&(l(i),l(s),l(T),l(u),l(C),l(v),l(Z),l(g),l(B),l(H)),h(M,j)}}}function tr($){let i,o;return i=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yTWFza2VkTE0lMkMlMjBBdXRvVG9rZW5pemVyJTBBJTBBY2hlY2twb2ludCUyMCUzRCUyMCUyMmNhbWVtYmVydC1iYXNlJTIyJTBBJTBBbW9kZWwlMjAlM0QlMjBURkF1dG9Nb2RlbEZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForMaskedLM, AutoTokenizer

checkpoint = <span class="hljs-string">&quot;camembert-base&quot;</span>

model = TFAutoModelForMaskedLM.from_pretrained(checkpoint)
tokenizer = AutoTokenizer.from_pretrained(checkpoint)`,wrap:!1}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function er($){let i,o;return i=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvck1hc2tlZExNJTJDJTIwQXV0b1Rva2VuaXplciUwQSUwQWNoZWNrcG9pbnQlMjAlM0QlMjAlMjJjYW1lbWJlcnQtYmFzZSUyMiUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yTWFza2VkTE0uZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForMaskedLM, AutoTokenizer

checkpoint = <span class="hljs-string">&quot;camembert-base&quot;</span>

model = AutoModelForMaskedLM.from_pretrained(checkpoint)
tokenizer = AutoTokenizer.from_pretrained(checkpoint)`,wrap:!1}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function lr($){let i,o='<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter4/push_to_hub_dummy_model_tf.png" alt="Dummy model containing both the tokenizer and model files." width="80%"/>';return{c(){i=m("div"),i.innerHTML=o,this.h()},l(s){i=a(s,"DIV",{class:!0,"data-svelte-h":!0}),f(i)!=="svelte-5a3kk0"&&(i.innerHTML=o),this.h()},h(){W(i,"class","flex justify-center")},m(s,M){n(s,i,M)},d(s){s&&l(i)}}}function nr($){let i,o='<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter4/push_to_hub_dummy_model.png" alt="Dummy model containing both the tokenizer and model files." width="80%"/>';return{c(){i=m("div"),i.innerHTML=o,this.h()},l(s){i=a(s,"DIV",{class:!0,"data-svelte-h":!0}),f(i)!=="svelte-19u1vyv"&&(i.innerHTML=o),this.h()},h(){W(i,"class","flex justify-center")},m(s,M){n(s,i,M)},d(s){s&&l(i)}}}function ir($){let i,o="✏️ <strong>試試看</strong>！獲取與檢查點關聯的模型和標記器，並使用該方法將它們上傳到您的命名空間中的存儲庫。在刪除之前，請仔細檢查該存儲庫是否正確顯示在您的頁面上。";return{c(){i=m("p"),i.innerHTML=o},l(s){i=a(s,"P",{"data-svelte-h":!0}),f(i)!=="svelte-173pvtw"&&(i.innerHTML=o)},m(s,M){n(s,i,M)},p:Vp,d(s){s&&l(i)}}}function sr($){let i,o;return i=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yTWFza2VkTE0lMkMlMjBBdXRvVG9rZW5pemVyJTBBJTBBY2hlY2twb2ludCUyMCUzRCUyMCUyMmNhbWVtYmVydC1iYXNlJTIyJTBBJTBBbW9kZWwlMjAlM0QlMjBURkF1dG9Nb2RlbEZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQpJTBBJTBBJTIzJTIwRG8lMjB3aGF0ZXZlciUyMHdpdGglMjB0aGUlMjBtb2RlbCUyQyUyMHRyYWluJTIwaXQlMkMlMjBmaW5lLXR1bmUlMjBpdC4uLiUwQSUwQW1vZGVsLnNhdmVfcHJldHJhaW5lZCglMjIlM0NwYXRoX3RvX2R1bW15X2ZvbGRlciUzRSUyMiklMEF0b2tlbml6ZXIuc2F2ZV9wcmV0cmFpbmVkKCUyMiUzQ3BhdGhfdG9fZHVtbXlfZm9sZGVyJTNFJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForMaskedLM, AutoTokenizer

checkpoint = <span class="hljs-string">&quot;camembert-base&quot;</span>

model = TFAutoModelForMaskedLM.from_pretrained(checkpoint)
tokenizer = AutoTokenizer.from_pretrained(checkpoint)

<span class="hljs-comment"># Do whatever with the model, train it, fine-tune it...</span>

model.save_pretrained(<span class="hljs-string">&quot;&lt;path_to_dummy_folder&gt;&quot;</span>)
tokenizer.save_pretrained(<span class="hljs-string">&quot;&lt;path_to_dummy_folder&gt;&quot;</span>)`,wrap:!1}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function pr($){let i,o;return i=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvck1hc2tlZExNJTJDJTIwQXV0b1Rva2VuaXplciUwQSUwQWNoZWNrcG9pbnQlMjAlM0QlMjAlMjJjYW1lbWJlcnQtYmFzZSUyMiUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yTWFza2VkTE0uZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCklMEElMEElMjMlMjBEbyUyMHdoYXRldmVyJTIwd2l0aCUyMHRoZSUyMG1vZGVsJTJDJTIwdHJhaW4lMjBpdCUyQyUyMGZpbmUtdHVuZSUyMGl0Li4uJTBBJTBBbW9kZWwuc2F2ZV9wcmV0cmFpbmVkKCUyMiUzQ3BhdGhfdG9fZHVtbXlfZm9sZGVyJTNFJTIyKSUwQXRva2VuaXplci5zYXZlX3ByZXRyYWluZWQoJTIyJTNDcGF0aF90b19kdW1teV9mb2xkZXIlM0UlMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForMaskedLM, AutoTokenizer

checkpoint = <span class="hljs-string">&quot;camembert-base&quot;</span>

model = AutoModelForMaskedLM.from_pretrained(checkpoint)
tokenizer = AutoTokenizer.from_pretrained(checkpoint)

<span class="hljs-comment"># Do whatever with the model, train it, fine-tune it...</span>

model.save_pretrained(<span class="hljs-string">&quot;&lt;path_to_dummy_folder&gt;&quot;</span>)
tokenizer.save_pretrained(<span class="hljs-string">&quot;&lt;path_to_dummy_folder&gt;&quot;</span>)`,wrap:!1}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function rr($){let i,o,s,M="如果您查看文件大小（例如， <strong>ls -lh</strong> )，您應該會看到模型狀態 dict 文件 (pytorch_model.bin) 是唯一的異常值，超過 400 MB。",T;return i=new U({props:{code:"Y29uZmlnLmpzb24lMjAlMjBSRUFETUUubWQlMjAlMjBzZW50ZW5jZXBpZWNlLmJwZS5tb2RlbCUyMCUyMHNwZWNpYWxfdG9rZW5zX21hcC5qc29uJTIwJTIwdGZfbW9kZWwuaDUlMjAlMjB0b2tlbml6ZXJfY29uZmlnLmpzb24lMjAlMjB0b2tlbml6ZXIuanNvbg==",highlighted:"config.json  README.md  sentencepiece.bpe.model  special_tokens_map.json  tf_model.h5  tokenizer_config.json  tokenizer.json",wrap:!1}}),{c(){y(i.$$.fragment),o=p(),s=m("p"),s.innerHTML=M},l(u){d(i.$$.fragment,u),o=r(u),s=a(u,"P",{"data-svelte-h":!0}),f(s)!=="svelte-1csho22"&&(s.innerHTML=M)},m(u,w){_(i,u,w),n(u,o,w),n(u,s,w),T=!0},i(u){T||(b(i.$$.fragment,u),T=!0)},o(u){c(i.$$.fragment,u),T=!1},d(u){u&&(l(o),l(s)),h(i,u)}}}function or($){let i,o,s,M="If you look at the file sizes (for example, with <code>ls -lh</code>), you should see that the model state dict file (<em>pytorch_model.bin</em>) is the only outlier, at more than 400 MB.",T;return i=new U({props:{code:"Y29uZmlnLmpzb24lMjAlMjBweXRvcmNoX21vZGVsLmJpbiUyMCUyMFJFQURNRS5tZCUyMCUyMHNlbnRlbmNlcGllY2UuYnBlLm1vZGVsJTIwJTIwc3BlY2lhbF90b2tlbnNfbWFwLmpzb24lMjB0b2tlbml6ZXJfY29uZmlnLmpzb24lMjAlMjB0b2tlbml6ZXIuanNvbg==",highlighted:"config.json  pytorch_model.bin  README.md  sentencepiece.bpe.model  special_tokens_map.json tokenizer_config.json  tokenizer.json",wrap:!1}}),{c(){y(i.$$.fragment),o=p(),s=m("p"),s.innerHTML=M},l(u){d(i.$$.fragment,u),o=r(u),s=a(u,"P",{"data-svelte-h":!0}),f(s)!=="svelte-174jxm4"&&(s.innerHTML=M)},m(u,w){_(i,u,w),n(u,o,w),n(u,s,w),T=!0},i(u){T||(b(i.$$.fragment,u),T=!0)},o(u){c(i.$$.fragment,u),T=!1},d(u){u&&(l(o),l(s)),h(i,u)}}}function mr($){let i;return{c(){i=Yp("✏️ 從 web 界面創建存儲庫時，*.gitattributes* 文件會自動設置為將具有某些擴展名的文件，例如 *.bin* 和 *.h5* 視為大文件，git-lfs 會對其進行跟蹤您無需進行必要的設置。")},l(o){i=Ap(o,"✏️ 從 web 界面創建存儲庫時，*.gitattributes* 文件會自動設置為將具有某些擴展名的文件，例如 *.bin* 和 *.h5* 視為大文件，git-lfs 會對其進行跟蹤您無需進行必要的設置。")},m(o,s){n(o,i,s)},d(o){o&&l(i)}}}function ar($){let i,o;return i=new U({props:{code:"T24lMjBicmFuY2glMjBtYWluJTBBWW91ciUyMGJyYW5jaCUyMGlzJTIwdXAlMjB0byUyMGRhdGUlMjB3aXRoJTIwJ29yaWdpbiUyRm1haW4nLiUwQSUwQUNoYW5nZXMlMjB0byUyMGJlJTIwY29tbWl0dGVkJTNBJTBBJTIwJTIwKHVzZSUyMCUyMmdpdCUyMHJlc3RvcmUlMjAtLXN0YWdlZCUyMCUzQ2ZpbGUlM0UuLi4lMjIlMjB0byUyMHVuc3RhZ2UpJTBBJTIwJTIwbW9kaWZpZWQlM0ElMjAlMjAlMjAuZ2l0YXR0cmlidXRlcyUwQSUyMCUyMCUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjBjb25maWcuanNvbiUwQSUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjBzZW50ZW5jZXBpZWNlLmJwZS5tb2RlbCUwQSUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjBzcGVjaWFsX3Rva2Vuc19tYXAuanNvbiUwQSUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjB0Zl9tb2RlbC5oNSUwQSUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjB0b2tlbml6ZXIuanNvbiUwQSUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjB0b2tlbml6ZXJfY29uZmlnLmpzb24=",highlighted:`On branch main
Your branch is up to <span class="hljs-built_in">date</span> with <span class="hljs-string">&#x27;origin/main&#x27;</span>.

Changes to be committed:
  (use <span class="hljs-string">&quot;git restore --staged &lt;file&gt;...&quot;</span> to unstage)
  modified:   .gitattributes
  	new file:   config.json
	new file:   sentencepiece.bpe.model
	new file:   special_tokens_map.json
	new file:   tf_model.h5
	new file:   tokenizer.json
	new file:   tokenizer_config.json`,wrap:!1}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function fr($){let i,o;return i=new U({props:{code:"T24lMjBicmFuY2glMjBtYWluJTBBWW91ciUyMGJyYW5jaCUyMGlzJTIwdXAlMjB0byUyMGRhdGUlMjB3aXRoJTIwJ29yaWdpbiUyRm1haW4nLiUwQSUwQUNoYW5nZXMlMjB0byUyMGJlJTIwY29tbWl0dGVkJTNBJTBBJTIwJTIwKHVzZSUyMCUyMmdpdCUyMHJlc3RvcmUlMjAtLXN0YWdlZCUyMCUzQ2ZpbGUlM0UuLi4lMjIlMjB0byUyMHVuc3RhZ2UpJTBBJTIwJTIwbW9kaWZpZWQlM0ElMjAlMjAlMjAuZ2l0YXR0cmlidXRlcyUwQSUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjBjb25maWcuanNvbiUwQSUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjBweXRvcmNoX21vZGVsLmJpbiUwQSUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjBzZW50ZW5jZXBpZWNlLmJwZS5tb2RlbCUwQSUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjBzcGVjaWFsX3Rva2Vuc19tYXAuanNvbiUwQSUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjB0b2tlbml6ZXIuanNvbiUwQSUwOW5ldyUyMGZpbGUlM0ElMjAlMjAlMjB0b2tlbml6ZXJfY29uZmlnLmpzb24=",highlighted:`On branch main
Your branch is up to <span class="hljs-built_in">date</span> with <span class="hljs-string">&#x27;origin/main&#x27;</span>.

Changes to be committed:
  (use <span class="hljs-string">&quot;git restore --staged &lt;file&gt;...&quot;</span> to unstage)
  modified:   .gitattributes
	new file:   config.json
	new file:   pytorch_model.bin
	new file:   sentencepiece.bpe.model
	new file:   special_tokens_map.json
	new file:   tokenizer.json
	new file:   tokenizer_config.json`,wrap:!1}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function ur($){let i,o,s,M="我們可以看到所有文件都有 <strong>Git</strong> 作為處理程序，除了其中有 <strong>LFS</strong>的<em>t5_model.h5</em>。",T;return i=new U({props:{code:"T24lMjBicmFuY2glMjBtYWluJTBBT2JqZWN0cyUyMHRvJTIwYmUlMjBwdXNoZWQlMjB0byUyMG9yaWdpbiUyRm1haW4lM0ElMEElMEElMEFPYmplY3RzJTIwdG8lMjBiZSUyMGNvbW1pdHRlZCUzQSUwQSUwQSUwOWNvbmZpZy5qc29uJTIwKEdpdCUzQSUyMGJjMjBmZjIpJTBBJTA5c2VudGVuY2VwaWVjZS5icGUubW9kZWwlMjAoTEZTJTNBJTIwOTg4YmM1YSklMEElMDlzcGVjaWFsX3Rva2Vuc19tYXAuanNvbiUyMChHaXQlM0ElMjBjYjIzOTMxKSUwQSUwOXRmX21vZGVsLmg1JTIwKExGUyUzQSUyMDg2ZmNlMjkpJTBBJTA5dG9rZW5pemVyLmpzb24lMjAoR2l0JTNBJTIwODUxZmYzZSklMEElMDl0b2tlbml6ZXJfY29uZmlnLmpzb24lMjAoR2l0JTNBJTIwZjBmNzc4MyklMEElMEFPYmplY3RzJTIwbm90JTIwc3RhZ2VkJTIwZm9yJTIwY29tbWl0JTNBJTBBJTBB",highlighted:`On branch main
Objects to be pushed to origin/main:


Objects to be committed:

	config.json (Git: bc20ff2)
	sentencepiece.bpe.model (LFS: 988bc5a)
	special_tokens_map.json (Git: cb23931)
	tf_model.h5 (LFS: 86fce29)
	tokenizer.json (Git: 851ff3e)
	tokenizer_config.json (Git: f0f7783)

Objects not staged <span class="hljs-keyword">for</span> commit:

`,wrap:!1}}),{c(){y(i.$$.fragment),o=p(),s=m("p"),s.innerHTML=M},l(u){d(i.$$.fragment,u),o=r(u),s=a(u,"P",{"data-svelte-h":!0}),f(s)!=="svelte-cg1to"&&(s.innerHTML=M)},m(u,w){_(i,u,w),n(u,o,w),n(u,s,w),T=!0},i(u){T||(b(i.$$.fragment,u),T=!0)},o(u){c(i.$$.fragment,u),T=!1},d(u){u&&(l(o),l(s)),h(i,u)}}}function Mr($){let i,o,s,M="我們可以看到所有文件都有 <strong>Git</strong> 作為處理程序，除了其中有 <strong>LFS</strong>的<em>pytorch_model.bin</em> 和 <em>sentencepiece.bpe.model</em>。",T;return i=new U({props:{code:"T24lMjBicmFuY2glMjBtYWluJTBBT2JqZWN0cyUyMHRvJTIwYmUlMjBwdXNoZWQlMjB0byUyMG9yaWdpbiUyRm1haW4lM0ElMEElMEElMEFPYmplY3RzJTIwdG8lMjBiZSUyMGNvbW1pdHRlZCUzQSUwQSUwQSUwOWNvbmZpZy5qc29uJTIwKEdpdCUzQSUyMGJjMjBmZjIpJTBBJTA5cHl0b3JjaF9tb2RlbC5iaW4lMjAoTEZTJTNBJTIwMzU2ODZjMiklMEElMDlzZW50ZW5jZXBpZWNlLmJwZS5tb2RlbCUyMChMRlMlM0ElMjA5ODhiYzVhKSUwQSUwOXNwZWNpYWxfdG9rZW5zX21hcC5qc29uJTIwKEdpdCUzQSUyMGNiMjM5MzEpJTBBJTA5dG9rZW5pemVyLmpzb24lMjAoR2l0JTNBJTIwODUxZmYzZSklMEElMDl0b2tlbml6ZXJfY29uZmlnLmpzb24lMjAoR2l0JTNBJTIwZjBmNzc4MyklMEElMEFPYmplY3RzJTIwbm90JTIwc3RhZ2VkJTIwZm9yJTIwY29tbWl0JTNBJTBBJTBB",highlighted:`On branch main
Objects to be pushed to origin/main:


Objects to be committed:

	config.json (Git: bc20ff2)
	pytorch_model.bin (LFS: 35686c2)
	sentencepiece.bpe.model (LFS: 988bc5a)
	special_tokens_map.json (Git: cb23931)
	tokenizer.json (Git: 851ff3e)
	tokenizer_config.json (Git: f0f7783)

Objects not staged <span class="hljs-keyword">for</span> commit:

`,wrap:!1}}),{c(){y(i.$$.fragment),o=p(),s=m("p"),s.innerHTML=M},l(u){d(i.$$.fragment,u),o=r(u),s=a(u,"P",{"data-svelte-h":!0}),f(s)!=="svelte-1tchun8"&&(s.innerHTML=M)},m(u,w){_(i,u,w),n(u,o,w),n(u,s,w),T=!0},i(u){T||(b(i.$$.fragment,u),T=!0)},o(u){c(i.$$.fragment,u),T=!1},d(u){u&&(l(o),l(s)),h(i,u)}}}function cr($){let i,o;return i=new U({props:{code:"JTVCbWFpbiUyMGIwOGFhYjElNUQlMjBGaXJzdCUyMG1vZGVsJTIwdmVyc2lvbiUwQSUyMDYlMjBmaWxlcyUyMGNoYW5nZWQlMkMlMjAzNiUyMGluc2VydGlvbnMoJTJCKSUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjBjb25maWcuanNvbiUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjBzZW50ZW5jZXBpZWNlLmJwZS5tb2RlbCUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjBzcGVjaWFsX3Rva2Vuc19tYXAuanNvbiUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjB0Zl9tb2RlbC5oNSUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjB0b2tlbml6ZXIuanNvbiUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjB0b2tlbml6ZXJfY29uZmlnLmpzb24=",highlighted:`[main b08aab1] First model version
 6 files changed, 36 insertions(+)
 create mode 100644 config.json
 create mode 100644 sentencepiece.bpe.model
 create mode 100644 special_tokens_map.json
 create mode 100644 tf_model.h5
 create mode 100644 tokenizer.json
 create mode 100644 tokenizer_config.json`,wrap:!1}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function br($){let i,o;return i=new U({props:{code:"JTVCbWFpbiUyMGIwOGFhYjElNUQlMjBGaXJzdCUyMG1vZGVsJTIwdmVyc2lvbiUwQSUyMDclMjBmaWxlcyUyMGNoYW5nZWQlMkMlMjAyOTAyNyUyMGluc2VydGlvbnMoJTJCKSUwQSUyMCUyMDYlMjBmaWxlcyUyMGNoYW5nZWQlMkMlMjAzNiUyMGluc2VydGlvbnMoJTJCKSUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjBjb25maWcuanNvbiUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjBweXRvcmNoX21vZGVsLmJpbiUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjBzZW50ZW5jZXBpZWNlLmJwZS5tb2RlbCUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjBzcGVjaWFsX3Rva2Vuc19tYXAuanNvbiUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjB0b2tlbml6ZXIuanNvbiUwQSUyMGNyZWF0ZSUyMG1vZGUlMjAxMDA2NDQlMjB0b2tlbml6ZXJfY29uZmlnLmpzb24=",highlighted:`[main b08aab1] First model version
 7 files changed, 29027 insertions(+)
  6 files changed, 36 insertions(+)
 create mode 100644 config.json
 create mode 100644 pytorch_model.bin
 create mode 100644 sentencepiece.bpe.model
 create mode 100644 special_tokens_map.json
 create mode 100644 tokenizer.json
 create mode 100644 tokenizer_config.json`,wrap:!1}}),{c(){y(i.$$.fragment)},l(s){d(i.$$.fragment,s)},m(s,M){_(i,s,M),o=!0},i(s){o||(b(i.$$.fragment,s),o=!0)},o(s){c(i.$$.fragment,s),o=!1},d(s){h(i,s)}}}function gr($){let i,o="如果我們在完成後查看模型存儲庫，我們可以看到所有最近添加的文件：",s,M,T='<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter4/full_model_tf.png" alt="The &#39;Files and versions&#39; tab now contains all the recently uploaded files." width="80%"/>',u,w,C="UI 允許您瀏覽模型文件和提交，並查看每個提交引入的差異：",v,J,Z='<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter4/diffstf.gif" alt="The diff introduced by the recent commit." width="80%"/>';return{c(){i=m("p"),i.textContent=o,s=p(),M=m("div"),M.innerHTML=T,u=p(),w=m("p"),w.textContent=C,v=p(),J=m("div"),J.innerHTML=Z,this.h()},l(g){i=a(g,"P",{"data-svelte-h":!0}),f(i)!=="svelte-xel6h2"&&(i.textContent=o),s=r(g),M=a(g,"DIV",{class:!0,"data-svelte-h":!0}),f(M)!=="svelte-tz4fi2"&&(M.innerHTML=T),u=r(g),w=a(g,"P",{"data-svelte-h":!0}),f(w)!=="svelte-4kssbx"&&(w.textContent=C),v=r(g),J=a(g,"DIV",{class:!0,"data-svelte-h":!0}),f(J)!=="svelte-2jd8bj"&&(J.innerHTML=Z),this.h()},h(){W(M,"class","flex justify-center"),W(J,"class","flex justify-center")},m(g,k){n(g,i,k),n(g,s,k),n(g,M,k),n(g,u,k),n(g,w,k),n(g,v,k),n(g,J,k)},d(g){g&&(l(i),l(s),l(M),l(u),l(w),l(v),l(J))}}}function yr($){let i,o="If we take a look at the model repository when this is finished, we can see all the recently added files:",s,M,T='<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter4/full_model.png" alt="The &#39;Files and versions&#39; tab now contains all the recently uploaded files." width="80%"/>',u,w,C="UI 允許您瀏覽模型文件和提交，並查看每個提交引入的差異：",v,J,Z='<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter4/diffs.gif" alt="The diff introduced by the recent commit." width="80%"/>';return{c(){i=m("p"),i.textContent=o,s=p(),M=m("div"),M.innerHTML=T,u=p(),w=m("p"),w.textContent=C,v=p(),J=m("div"),J.innerHTML=Z,this.h()},l(g){i=a(g,"P",{"data-svelte-h":!0}),f(i)!=="svelte-dr5wot"&&(i.textContent=o),s=r(g),M=a(g,"DIV",{class:!0,"data-svelte-h":!0}),f(M)!=="svelte-1v39mjb"&&(M.innerHTML=T),u=r(g),w=a(g,"P",{"data-svelte-h":!0}),f(w)!=="svelte-4kssbx"&&(w.textContent=C),v=r(g),J=a(g,"DIV",{class:!0,"data-svelte-h":!0}),f(J)!=="svelte-1g561m5"&&(J.innerHTML=Z),this.h()},h(){W(M,"class","flex justify-center"),W(J,"class","flex justify-center")},m(g,k){n(g,i,k),n(g,s,k),n(g,M,k),n(g,u,k),n(g,w,k),n(g,v,k),n(g,J,k)},d(g){g&&(l(i),l(s),l(M),l(u),l(w),l(v),l(J))}}}function dr($){let i,o,s,M,T,u,w,C,v,J,Z,g,k,B,H="在下面的步驟中，我們將看看將預訓練模型分享到 🤗 Hub 的最簡單方法。有可用的工具和實用程序可以讓直接在 Hub 上共享和更新模型變得簡單，我們將在下面進行探討。",mt,x,j,G,Qi="我們鼓勵所有訓練模型的用戶通過與社區共享來做出貢獻——共享模型，即使是在非常特定的數據集上進行訓練，也將幫助他人，節省他們的時間和計算資源，並提供對有用的訓練工件的訪問。反過來，您可以從其他人所做的工作中受益！",kl,at,Si="創建新模型存儲庫的方法有以下三種：",Jl,ft,Fi="<li>使用 push_to_hub API 接口</li> <li>使用 huggingface_hub Python 庫</li> <li>使用 web 界面</li>",Zl,ut,Ei="創建存儲庫後，您可以通過 git 和 git-lfs 將文件上傳到其中。我們將在以下部分引導您創建模型存儲庫並將文件上傳到它們",Cl,Mt,Gl,I,N,gl,ct,Pi="將文件上傳到模型中心的最簡單方法是利用 <strong>push_to_hub</strong> API 接口。",Wl,bt,qi='在繼續之前，您需要生成一個身份驗證令牌，以便 <strong>huggingface_hub</strong> API 知道您是誰以及您對哪些名稱空間具有寫入權限。確保你在一個環境中 <strong>transformers</strong> 已安裝（見<a href="/course/chapter0">Setup</a>）。如果您在筆記本中，可以使用以下功能登錄：',Bl,gt,xl,yt,Di="在終端中，您可以運行：",Hl,dt,Il,_t,Ki='在這兩種情況下，系統都會提示您輸入用戶名和密碼，這與您用於登錄 Hub 的用戶名和密碼相同。如果您還沒有 Hub 配置文件，則應該創建一個<a href="https://huggingface.co/join" rel="nofollow">here</a>。',Nl,ht,Oi="好的！您現在已將身份驗證令牌存儲在緩存文件夾中。讓我們創建一些存儲庫！",Vl,V,L,yl,$t,ts="在較低級別，可以通過模型、標記器和配置對象直接訪問模型中心 <strong>push_to_hub()</strong> 方法。此方法負責創建存儲庫並將模型和標記器文件直接推送到存儲庫。與我們將在下面看到的 API 不同，不需要手動處理。",Ll,wt,es="為了瞭解它是如何工作的，讓我們首先初始化一個模型和一個標記器：",Xl,X,R,dl,Tt,ls="你可以自由地用這些做任何你想做的事情——向標記器添加標記，訓練模型，微調它。一旦您對生成的模型、權重和標記器感到滿意，您就可以利用 <strong>push_to_hub()</strong> 方法直接在 <strong>model</strong> 中：",Rl,Ut,zl,jt,ns=`這將創建新的存儲庫 <strong>dummy-model</strong> 在您的個人資料中，並用您的模型文件填充它。
對標記器執行相同的操作，以便所有文件現在都可以在此存儲庫中使用：`,Yl,vt,Al,kt,is="如果您屬於一個組織，只需指定 <strong>organization</strong> 上傳到該組織的命名空間的參數：",Ql,Jt,Sl,Zt,ss="如果您希望使用特定的 Hugging Face 令牌，您可以自由地將其指定給 <strong>push_to_hub()</strong> 方法也是：",Fl,Ct,El,Gt,ps='現在前往模型中心找到您新上傳的模型：<em><a href="https://huggingface.co/user-or-organization/dummy-model" rel="nofollow">https://huggingface.co/user-or-organization/dummy-model</a></em>。',Pl,Wt,rs="單擊“文件和版本”選項卡，您應該會在以下屏幕截圖中看到可見的文件：",ql,_l,lt,Dl,Bt,os='如您所見， <strong>push_to_hub()</strong> 方法接受多個參數，從而可以上傳到特定的存儲庫或組織命名空間，或使用不同的 API 令牌。我們建議您查看直接在<a href="https://huggingface.co/transformers/model_sharing.html" rel="nofollow">🤗 Transformers documentation</a>瞭解什麼是可能的',Kl,xt,ms='這 <strong>push_to_hub()</strong> 方法由<a href="https://github.com/huggingface/huggingface_hub" rel="nofollow">huggingface_hub</a>Python 包，為 Hugging Face Hub 提供直接 API。它集成在 🤗 Transformers 和其他幾個機器學習庫中，例如<a href="https://github.com/allenai/allennlp" rel="nofollow">allenlp</a>.雖然我們在本章中專注於 🤗 Transformers 集成，但將其集成到您自己的代碼或庫中很簡單。',Ol,Ht,as="跳到最後一部分，瞭解如何將文件上傳到新創建的存儲庫！",tn,It,en,Nt,fs=`這 <strong>huggingface_hub</strong> Python 庫是一個包，它為模型和數據集中心提供了一組工具。它為常見任務提供了簡單的方法和類，例如
獲取有關模型中心上存儲庫的信息並對其進行管理。它提供了在 git 之上工作的簡單 API 來管理這些存儲庫的內容並集成 Hub
在您的項目和庫中。`,ln,Vt,us="類似於使用 <strong>push_to_hub</strong> API，這將要求您將 API 令牌保存在緩存中。為此，您需要使用 <strong>login</strong> 來自 CLI 的命令，如上一節所述（同樣，確保在這些命令前面加上 <strong>!</strong> 字符（如果在 Google Colab 中運行）：",nn,Lt,sn,Xt,Ms="這 <strong>huggingface_hub</strong> 包提供了幾種對我們有用的方法和類。首先，有幾種方法可以管理存儲庫的創建、刪除等：",pn,Rt,rn,zt,cs="此外，它還提供了非常強大的 <strong>Repository</strong> 用於管理本地存儲庫的類。我們將在接下來的幾節中探討這些方法和該類，以瞭解如何利用它們。",on,Yt,bs="這 <strong>create_repo</strong> 方法可用於在模型中心上創建新存儲庫：",mn,At,an,Qt,gs="這將創建存儲庫 <strong>dummy-model</strong> 在您的命名空間中。如果願意，您可以使用 <strong>organization</strong> 爭論：",fn,St,un,Ft,ys=`這將創建 <strong>dummy-model</strong> 存儲庫中的 <strong>huggingface</strong> 命名空間，假設您屬於該組織。
其他可能有用的參數是：`,Mn,Et,ds="<li>private 以指定存儲庫是否應對其他人可見。</li> <li>token 如果您想用給定的令牌覆蓋存儲在緩存中的令牌。</li> <li>repo_type 如果你想創建一個或一個替代一個的而不是模型。接受的值和 datasetspace “dataset&quot;&quot;space”。</li>",cn,Pt,_s="創建存儲庫後，我們應該向其中添加文件！跳到下一部分以查看可以處理此問題的三種方法。",bn,qt,gn,Dt,hs="Web 界面提供了直接在 Hub 中管理存儲庫的工具。使用該界面，您可以輕鬆創建存儲庫、添加文件（甚至是大文件！）、探索模型、可視化差異等等。",yn,Kt,$s='要創建新的存儲庫，請訪問<a href="https://huggingface.co/new" rel="nofollow">huggingface.co/new</a>：',dn,nt,ws='<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter4/new_model.png" alt="Page showcasing the model used for the creation of a new model repository." width="80%"/>',_n,Ot,Ts="首先，指定存儲庫的所有者：這可以是您或您所屬的任何組織。如果您選擇一個組織，該模型將出現在該組織的頁面上，並且該組織的每個成員都可以為存儲庫做出貢獻。",hn,te,Us="接下來，輸入您的模型名稱。這也將是存儲庫的名稱。最後，您可以指定您的模型是公開的還是私有的。私人模特要求您擁有付費 Hugging Face 帳戶，並允許您將模特隱藏在公眾視野之外。",$n,ee,js="創建模型存儲庫後，您應該看到如下頁面：",wn,it,vs='<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter4/empty_model.png" alt="An empty model page after creating a new repository." width="80%"/>',Tn,le,ks="這是您的模型將被託管的地方。要開始填充它，您可以直接從 Web 界面添加 README 文件。",Un,st,Js='<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter4/dummy_model.png" alt="The README file showing the Markdown capabilities." width="80%"/>',jn,ne,Zs="README 文件在 Markdown 中 - 隨意使用它！本章的第三部分致力於構建模型卡。這些對於為您的模型帶來價值至關重要，因為它們是您告訴其他人它可以做什麼的地方。",vn,ie,Cs="如果您查看“文件和版本”選項卡，您會發現那裡還沒有很多文件——只有自述文件你剛剛創建和.git 屬性跟蹤大文件的文件。",kn,pt,Gs='<img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter4/files.png" alt="The &#39;Files and versions&#39; tab only shows the .gitattributes and README.md files." width="80%"/>',Jn,se,Ws="接下來我們將看看如何添加一些新文件。",Zn,pe,Cn,re,Bs='Hugging Face Hub 上的文件管理系統基於用於常規文件的 git 和 git-lfs（代表<a href="https://git-lfs.github.com/" rel="nofollow">Git Large File Storage</a>) 對於較大的文件。',Gn,oe,xs="在下一節中，我們將介紹將文件上傳到 Hub 的三種不同方式：通過 <strong>huggingface_hub</strong> 並通過 git 命令。",Wn,me,Bn,ae,Hs=`使用 <strong>upload_file</strong> 不需要在您的系統上安裝 git 和 git-lfs。它使用 HTTP POST 請求將文件直接推送到 🤗 Hub。這種方法的一個限制是它不能處理大於 5GB 的文件。
如果您的文件大於 5GB，請按照下面詳述的另外兩種方法進行操作。API 可以按如下方式使用：`,xn,fe,Hn,ue,Is=`這將上傳文件 <strong>config.json</strong> 可在 <strong>path_to_file</strong> 到存儲庫的根目錄 <strong>config.json</strong> , 到 <strong>dummy-model</strong> 存儲庫。
其他可能有用的參數是：`,In,Me,Ns="<li>token，如果要通過給定的令牌覆蓋緩存中存儲的令牌。</li> <li>repo_type, 如果你想要上傳一個 <code>dataset</code> 或一個 <code>space</code> 而不是模型。 接受的值為 <code>&quot;dataset&quot;</code> 和 <code>&quot;space&quot;</code>.</li>",Nn,ce,Vn,be,Vs="以類似 git 的方式管理本地存儲庫。它抽象了 git 可能遇到的大部分痛點，以提供我們需要的所有功能。",Ln,ge,Ls='使用這個類需要安裝 git 和 git-lfs，所以確保你已經安裝了 git-lfs（參見<a href="https://git-lfs.github.com/" rel="nofollow">here</a>安裝說明）並在開始之前進行設置。',Xn,ye,Xs="為了開始使用我們剛剛創建的存儲庫，我們可以通過克隆遠程存儲庫將其初始化到本地文件夾開始：",Rn,de,zn,_e,Rs="這創建了文件夾 <strong>path_to_dummy_folder</strong> 在我們的工作目錄中。該文件夾僅包含 <strong>.gitattributes</strong> 文件，因為這是通過實例化存儲庫時創建的唯一文件 <strong>create_repo</strong>。",Yn,he,zs="從現在開始，我們可以利用幾種傳統的 git 方法：",An,$e,Qn,we,Ys='另外！我們建議您查看 <strong>Repository</strong> 可用文件<a href="https://github.com/huggingface/huggingface_hub/tree/main/src/huggingface_hub#advanced-programmatic-repository-management" rel="nofollow">here</a>有關所有可用方法的概述。',Sn,Te,As="目前，我們有一個模型和一個標記器，我們希望將其推送到模型中心。我們已經成功克隆了存儲庫，因此我們可以將文件保存在該存儲庫中。",Fn,Ue,Qs="我們首先通過拉取最新更改來確保我們的本地克隆是最新的：",En,je,Pn,ve,Ss="完成後，我們保存模型和標記器文件：",qn,ke,Dn,Je,Fs="這 <strong>path_to_dummy_folder</strong> 現在包含所有模型和標記器文件。我們遵循通常的 git 工作流程，將文件添加到暫存區，提交它們並將它們推送到模型中心：",Kn,Ze,On,Ce,Es="恭喜！您剛剛將第一個文件推送到hub上。",ti,Ge,ei,We,Ps="這是上傳文件的非常簡單的方法：我們將直接使用 git 和 git-lfs 來完成。大多數困難都被以前的方法抽象掉了，但是下面的方法有一些警告，所以我們將遵循一個更復雜的用例。",li,Be,qs='使用這個類需要安裝 git 和 git-lfs，所以請確保你有<a href="https://git-lfs.github.com/" rel="nofollow">git-lfs</a>安裝（請參閱此處瞭解安裝說明）並在開始之前進行設置。',ni,xe,Ds="首先從初始化 git-lfs 開始：",ii,He,si,Ie,pi,Ne,Ks="完成後，第一步是克隆您的模型存儲庫：",ri,Ve,oi,Le,Os="我的用戶名是 <strong>lysandre</strong> 我使用了模型名稱 <strong>dummy</strong> ，所以對我來說，命令最終如下所示：",mi,Xe,ai,Re,tp="我現在有一個名為的文件夾假在我的工作目錄中。我能 <strong>cd</strong> 進入文件夾並查看內容：",fi,ze,ui,Ye,Mi,Ae,ep="如果您剛剛使用 Hugging Face Hub 創建了您的存儲庫 <strong>create_repo</strong> 方法，這個文件夾應該只包含一個隱藏的 <strong>.gitattributes</strong> 文件。如果您按照上一節中的說明使用 Web 界面創建存儲庫，則該文件夾應包含一個自述文件文件旁邊的隱藏 <strong>.gitattributes</strong> 文件，如圖所示。",ci,Qe,lp="添加一個常規大小的文件，例如配置文件、詞彙文件，或者基本上任何幾兆字節以下的文件，就像在任何基於 git 的系統中所做的一樣。但是，更大的文件必須通過 git-lfs 註冊才能將它們推送到Hugging Face。",bi,Se,np="讓我們回到 Python 來生成我們想要提交到我們的虛擬存儲庫的模型和標記器：",gi,z,Y,hl,Fe,ip="現在我們已經保存了一些模型和標記器工件，讓我們再看看假文件夾：",yi,Ee,di,A,Q,$l,rt,_i,Pe,sp="我們現在可以繼續進行，就像我們通常使用傳統 Git 存儲庫一樣。我們可以使用以下命令將所有文件添加到 Git 的暫存環境中 <strong>git add</strong> 命令：",hi,qe,$i,De,pp="然後我們可以查看當前暫存的文件：",wi,Ke,Ti,S,F,wl,Oe,rp="同樣，我們可以確保 git-lfs 使用其跟蹤正確的文件 <strong>status</strong> 命令：",Ui,tl,ji,E,P,Tl,el,op="讓我們繼續最後的步驟，提交併推送到Hugging Face遠程倉庫：",vi,ll,ki,q,D,Ul,nl,mp="推送可能需要一些時間，具體取決於您的互聯網連接速度和文件大小：",Ji,il,Zi,sl,Ci,jl,pl,Gi,vl,Wi;T=new Fp({props:{fw:$[0]}}),w=new Qp({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),v=new ot({props:{title:"共享預訓練模型",local:"共享預訓練模型",headingTag:"h1"}});const ap=[Pp,Ep],rl=[];function fp(t,e){return t[0]==="pt"?0:1}Z=fp($),g=rl[Z]=ap[Z]($),x=new Ai({props:{id:"9yY3RB_GSPM"}}),Mt=new ot({props:{title:"使用 push_to_hub API",local:"使用-pushtohub-api",headingTag:"h2"}});const up=[Dp,qp],ol=[];function Mp(t,e){return t[0]==="pt"?0:1}I=Mp($),N=ol[I]=up[I]($),gt=new U({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG5vdGVib29rX2xvZ2luJTBBJTBBbm90ZWJvb2tfbG9naW4oKQ==",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login

notebook_login()`,wrap:!1}}),dt=new U({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:"huggingface-cli login",wrap:!1}});const cp=[Op,Kp],ml=[];function bp(t,e){return t[0]==="pt"?0:1}V=bp($),L=ml[V]=cp[V]($);const gp=[er,tr],al=[];function yp(t,e){return t[0]==="pt"?0:1}X=yp($),R=al[X]=gp[X]($),Ut=new U({props:{code:"bW9kZWwucHVzaF90b19odWIoJTIyZHVtbXktbW9kZWwlMjIp",highlighted:'model.push_to_hub(<span class="hljs-string">&quot;dummy-model&quot;</span>)',wrap:!1}}),vt=new U({props:{code:"dG9rZW5pemVyLnB1c2hfdG9faHViKCUyMmR1bW15LW1vZGVsJTIyKQ==",highlighted:'tokenizer.push_to_hub(<span class="hljs-string">&quot;dummy-model&quot;</span>)',wrap:!1}}),Jt=new U({props:{code:"dG9rZW5pemVyLnB1c2hfdG9faHViKCUyMmR1bW15LW1vZGVsJTIyJTJDJTIwb3JnYW5pemF0aW9uJTNEJTIyaHVnZ2luZ2ZhY2UlMjIp",highlighted:'tokenizer.push_to_hub(<span class="hljs-string">&quot;dummy-model&quot;</span>, organization=<span class="hljs-string">&quot;huggingface&quot;</span>)',wrap:!1}}),Ct=new U({props:{code:"dG9rZW5pemVyLnB1c2hfdG9faHViKCUyMmR1bW15LW1vZGVsJTIyJTJDJTIwb3JnYW5pemF0aW9uJTNEJTIyaHVnZ2luZ2ZhY2UlMjIlMkMlMjB1c2VfYXV0aF90b2tlbiUzRCUyMiUzQ1RPS0VOJTNFJTIyKQ==",highlighted:'tokenizer.push_to_hub(<span class="hljs-string">&quot;dummy-model&quot;</span>, organization=<span class="hljs-string">&quot;huggingface&quot;</span>, use_auth_token=<span class="hljs-string">&quot;&lt;TOKEN&gt;&quot;</span>)',wrap:!1}});function dp(t,e){return t[0]==="pt"?nr:lr}let Bi=dp($),K=Bi($);lt=new xp({props:{$$slots:{default:[ir]},$$scope:{ctx:$}}}),It=new ot({props:{title:"使用 huggingface_hub python庫",local:"使用-huggingfacehub-python庫",headingTag:"h2"}}),Lt=new U({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:"huggingface-cli login",wrap:!1}}),Rt=new U({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMCglMEElMjAlMjAlMjAlMjAlMjMlMjBVc2VyJTIwbWFuYWdlbWVudCUwQSUyMCUyMCUyMCUyMGxvZ2luJTJDJTBBJTIwJTIwJTIwJTIwbG9nb3V0JTJDJTBBJTIwJTIwJTIwJTIwd2hvYW1pJTJDJTBBJTBBJTIwJTIwJTIwJTIwJTIzJTIwUmVwb3NpdG9yeSUyMGNyZWF0aW9uJTIwYW5kJTIwbWFuYWdlbWVudCUwQSUyMCUyMCUyMCUyMGNyZWF0ZV9yZXBvJTJDJTBBJTIwJTIwJTIwJTIwZGVsZXRlX3JlcG8lMkMlMEElMjAlMjAlMjAlMjB1cGRhdGVfcmVwb192aXNpYmlsaXR5JTJDJTBBJTBBJTIwJTIwJTIwJTIwJTIzJTIwQW5kJTIwc29tZSUyMG1ldGhvZHMlMjB0byUyMHJldHJpZXZlJTJGY2hhbmdlJTIwaW5mb3JtYXRpb24lMjBhYm91dCUyMHRoZSUyMGNvbnRlbnQlMEElMjAlMjAlMjAlMjBsaXN0X21vZGVscyUyQyUwQSUyMCUyMCUyMCUyMGxpc3RfZGF0YXNldHMlMkMlMEElMjAlMjAlMjAlMjBsaXN0X21ldHJpY3MlMkMlMEElMjAlMjAlMjAlMjBsaXN0X3JlcG9fZmlsZXMlMkMlMEElMjAlMjAlMjAlMjB1cGxvYWRfZmlsZSUyQyUwQSUyMCUyMCUyMCUyMGRlbGV0ZV9maWxlJTJDJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> (
    <span class="hljs-comment"># User management</span>
    login,
    logout,
    whoami,

    <span class="hljs-comment"># Repository creation and management</span>
    create_repo,
    delete_repo,
    update_repo_visibility,

    <span class="hljs-comment"># And some methods to retrieve/change information about the content</span>
    list_models,
    list_datasets,
    list_metrics,
    list_repo_files,
    upload_file,
    delete_file,
)`,wrap:!1}}),At=new U({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGNyZWF0ZV9yZXBvJTBBJTBBY3JlYXRlX3JlcG8oJTIyZHVtbXktbW9kZWwlMjIp",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> create_repo

create_repo(<span class="hljs-string">&quot;dummy-model&quot;</span>)`,wrap:!1}}),St=new U({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGNyZWF0ZV9yZXBvJTBBJTBBY3JlYXRlX3JlcG8oJTIyZHVtbXktbW9kZWwlMjIlMkMlMjBvcmdhbml6YXRpb24lM0QlMjJodWdnaW5nZmFjZSUyMik=",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> create_repo

create_repo(<span class="hljs-string">&quot;dummy-model&quot;</span>, organization=<span class="hljs-string">&quot;huggingface&quot;</span>)`,wrap:!1}}),qt=new ot({props:{title:"使用網絡界面",local:"使用網絡界面",headingTag:"h2"}}),pe=new ot({props:{title:"上傳模型文件",local:"上傳模型文件",headingTag:"h2"}}),me=new ot({props:{title:"The upload_file approach",local:"the-uploadfile-approach",headingTag:"h3"}}),fe=new U({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMHVwbG9hZF9maWxlJTBBJTBBdXBsb2FkX2ZpbGUoJTBBJTIwJTIwJTIwJTIwJTIyJTNDcGF0aF90b19maWxlJTNFJTJGY29uZmlnLmpzb24lMjIlMkMlMEElMjAlMjAlMjAlMjBwYXRoX2luX3JlcG8lM0QlMjJjb25maWcuanNvbiUyMiUyQyUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjIlM0NuYW1lc3BhY2UlM0UlMkZkdW1teS1tb2RlbCUyMiUyQyUwQSk=",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> upload_file

upload_file(
    <span class="hljs-string">&quot;&lt;path_to_file&gt;/config.json&quot;</span>,
    path_in_repo=<span class="hljs-string">&quot;config.json&quot;</span>,
    repo_id=<span class="hljs-string">&quot;&lt;namespace&gt;/dummy-model&quot;</span>,
)`,wrap:!1}}),ce=new ot({props:{title:"The Repository class",local:"the-repository-class",headingTag:"h3"}}),de=new U({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMFJlcG9zaXRvcnklMEElMEFyZXBvJTIwJTNEJTIwUmVwb3NpdG9yeSglMjIlM0NwYXRoX3RvX2R1bW15X2ZvbGRlciUzRSUyMiUyQyUyMGNsb25lX2Zyb20lM0QlMjIlM0NuYW1lc3BhY2UlM0UlMkZkdW1teS1tb2RlbCUyMik=",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> Repository

repo = Repository(<span class="hljs-string">&quot;&lt;path_to_dummy_folder&gt;&quot;</span>, clone_from=<span class="hljs-string">&quot;&lt;namespace&gt;/dummy-model&quot;</span>)`,wrap:!1}}),$e=new U({props:{code:"cmVwby5naXRfcHVsbCgpJTBBcmVwby5naXRfYWRkKCklMEFyZXBvLmdpdF9jb21taXQoKSUwQXJlcG8uZ2l0X3B1c2goKSUwQXJlcG8uZ2l0X3RhZygp",highlighted:`repo.git_pull()
repo.git_add()
repo.git_commit()
repo.git_push()
repo.git_tag()`,wrap:!1}}),je=new U({props:{code:"cmVwby5naXRfcHVsbCgp",highlighted:"repo.git_pull()",wrap:!1}}),ke=new U({props:{code:"bW9kZWwuc2F2ZV9wcmV0cmFpbmVkKCUyMiUzQ3BhdGhfdG9fZHVtbXlfZm9sZGVyJTNFJTIyKSUwQXRva2VuaXplci5zYXZlX3ByZXRyYWluZWQoJTIyJTNDcGF0aF90b19kdW1teV9mb2xkZXIlM0UlMjIp",highlighted:`model.save_pretrained(<span class="hljs-string">&quot;&lt;path_to_dummy_folder&gt;&quot;</span>)
tokenizer.save_pretrained(<span class="hljs-string">&quot;&lt;path_to_dummy_folder&gt;&quot;</span>)`,wrap:!1}}),Ze=new U({props:{code:"cmVwby5naXRfYWRkKCklMEFyZXBvLmdpdF9jb21taXQoJTIyQWRkJTIwbW9kZWwlMjBhbmQlMjB0b2tlbml6ZXIlMjBmaWxlcyUyMiklMEFyZXBvLmdpdF9wdXNoKCk=",highlighted:`repo.git_add()
repo.git_commit(<span class="hljs-string">&quot;Add model and tokenizer files&quot;</span>)
repo.git_push()`,wrap:!1}}),Ge=new ot({props:{title:"The git-based approach",local:"the-git-based-approach",headingTag:"h3"}}),He=new U({props:{code:"Z2l0JTIwbGZzJTIwaW5zdGFsbA==",highlighted:"git lfs install",wrap:!1}}),Ie=new U({props:{code:"VXBkYXRlZCUyMGdpdCUyMGhvb2tzLiUwQUdpdCUyMExGUyUyMGluaXRpYWxpemVkLg==",highlighted:`Updated git hooks.
Git LFS initialized.`,wrap:!1}}),Ve=new U({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGJTNDbmFtZXNwYWNlJTNFJTJGJTNDeW91ci1tb2RlbC1pZCUzRQ==",highlighted:'git <span class="hljs-built_in">clone</span> https://huggingface.co/&lt;namespace&gt;/&lt;your-model-id&gt;',wrap:!1}}),Xe=new U({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGbHlzYW5kcmUlMkZkdW1teQ==",highlighted:'git clone https:<span class="hljs-regexp">//</span>huggingface.co<span class="hljs-regexp">/lysandre/</span>dummy',wrap:!1}}),ze=new U({props:{code:"Y2QlMjBkdW1teSUyMCUyNiUyNiUyMGxz",highlighted:'<span class="hljs-built_in">cd</span> dummy &amp;&amp; <span class="hljs-built_in">ls</span>',wrap:!1}}),Ye=new U({props:{code:"UkVBRE1FLm1k",highlighted:"README.md",wrap:!1}});const _p=[pr,sr],fl=[];function hp(t,e){return t[0]==="pt"?0:1}z=hp($),Y=fl[z]=_p[z]($),Ee=new U({props:{code:"bHM=",highlighted:'<span class="hljs-built_in">ls</span>',wrap:!1}});const $p=[or,rr],ul=[];function wp(t,e){return t[0]==="pt"?0:1}A=wp($),Q=ul[A]=$p[A]($),rt=new xp({props:{$$slots:{default:[mr]},$$scope:{ctx:$}}}),qe=new U({props:{code:"Z2l0JTIwYWRkJTIwLg==",highlighted:"git add .",wrap:!1}}),Ke=new U({props:{code:"Z2l0JTIwc3RhdHVz",highlighted:"git status",wrap:!1}});const Tp=[fr,ar],Ml=[];function Up(t,e){return t[0]==="pt"?0:1}S=Up($),F=Ml[S]=Tp[S]($),tl=new U({props:{code:"Z2l0JTIwbGZzJTIwc3RhdHVz",highlighted:"git lfs status",wrap:!1}});const jp=[Mr,ur],cl=[];function vp(t,e){return t[0]==="pt"?0:1}E=vp($),P=cl[E]=jp[E]($),ll=new U({props:{code:"Z2l0JTIwY29tbWl0JTIwLW0lMjAlMjJGaXJzdCUyMG1vZGVsJTIwdmVyc2lvbiUyMg==",highlighted:'git commit -m <span class="hljs-string">&quot;First model version&quot;</span>',wrap:!1}});const kp=[br,cr],bl=[];function Jp(t,e){return t[0]==="pt"?0:1}q=Jp($),D=bl[q]=kp[q]($),il=new U({props:{code:"Z2l0JTIwcHVzaA==",highlighted:"git push",wrap:!1}}),sl=new U({props:{code:"VXBsb2FkaW5nJTIwTEZTJTIwb2JqZWN0cyUzQSUyMDEwMCUyNSUyMCgxJTJGMSklMkMlMjA0MzMlMjBNQiUyMCU3QyUyMDEuMyUyME1CJTJGcyUyQyUyMGRvbmUuJTBBRW51bWVyYXRpbmclMjBvYmplY3RzJTNBJTIwMTElMkMlMjBkb25lLiUwQUNvdW50aW5nJTIwb2JqZWN0cyUzQSUyMDEwMCUyNSUyMCgxMSUyRjExKSUyQyUyMGRvbmUuJTBBRGVsdGElMjBjb21wcmVzc2lvbiUyMHVzaW5nJTIwdXAlMjB0byUyMDEyJTIwdGhyZWFkcyUwQUNvbXByZXNzaW5nJTIwb2JqZWN0cyUzQSUyMDEwMCUyNSUyMCg5JTJGOSklMkMlMjBkb25lLiUwQVdyaXRpbmclMjBvYmplY3RzJTNBJTIwMTAwJTI1JTIwKDklMkY5KSUyQyUyMDI4OC4yNyUyMEtpQiUyMCU3QyUyMDYuMjclMjBNaUIlMkZzJTJDJTIwZG9uZS4lMEFUb3RhbCUyMDklMjAoZGVsdGElMjAxKSUyQyUyMHJldXNlZCUyMDAlMjAoZGVsdGElMjAwKSUyQyUyMHBhY2stcmV1c2VkJTIwMCUwQVRvJTIwaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmx5c2FuZHJlJTJGZHVtbXklMEElMjAlMjAlMjA4OTFiNDFkLi5iMDhhYWIxJTIwJTIwbWFpbiUyMC0lM0UlMjBtYWlu",highlighted:`Uploading LFS objects: 100% (1/1), 433 MB | 1.3 MB/s, <span class="hljs-keyword">done</span>.
Enumerating objects: 11, <span class="hljs-keyword">done</span>.
Counting objects: 100% (11/11), <span class="hljs-keyword">done</span>.
Delta compression using up to 12 threads
Compressing objects: 100% (9/9), <span class="hljs-keyword">done</span>.
Writing objects: 100% (9/9), 288.27 KiB | 6.27 MiB/s, <span class="hljs-keyword">done</span>.
Total 9 (delta 1), reused 0 (delta 0), pack-reused 0
To https://huggingface.co/lysandre/dummy
   891b41d..b08aab1  main -&gt; main`,wrap:!1}});function Zp(t,e){return t[0]==="pt"?yr:gr}let xi=Zp($),O=xi($);return pl=new Sp({props:{source:"https://github.com/huggingface/course/blob/main/chapters/zh-TW/chapter4/3.mdx"}}),{c(){i=m("meta"),o=p(),s=m("p"),M=p(),y(T.$$.fragment),u=p(),y(w.$$.fragment),C=p(),y(v.$$.fragment),J=p(),g.c(),k=p(),B=m("p"),B.textContent=H,mt=p(),y(x.$$.fragment),j=p(),G=m("p"),G.textContent=Qi,kl=p(),at=m("p"),at.textContent=Si,Jl=p(),ft=m("ul"),ft.innerHTML=Fi,Zl=p(),ut=m("p"),ut.textContent=Ei,Cl=p(),y(Mt.$$.fragment),Gl=p(),N.c(),gl=p(),ct=m("p"),ct.innerHTML=Pi,Wl=p(),bt=m("p"),bt.innerHTML=qi,Bl=p(),y(gt.$$.fragment),xl=p(),yt=m("p"),yt.textContent=Di,Hl=p(),y(dt.$$.fragment),Il=p(),_t=m("p"),_t.innerHTML=Ki,Nl=p(),ht=m("p"),ht.textContent=Oi,Vl=p(),L.c(),yl=p(),$t=m("p"),$t.innerHTML=ts,Ll=p(),wt=m("p"),wt.textContent=es,Xl=p(),R.c(),dl=p(),Tt=m("p"),Tt.innerHTML=ls,Rl=p(),y(Ut.$$.fragment),zl=p(),jt=m("p"),jt.innerHTML=ns,Yl=p(),y(vt.$$.fragment),Al=p(),kt=m("p"),kt.innerHTML=is,Ql=p(),y(Jt.$$.fragment),Sl=p(),Zt=m("p"),Zt.innerHTML=ss,Fl=p(),y(Ct.$$.fragment),El=p(),Gt=m("p"),Gt.innerHTML=ps,Pl=p(),Wt=m("p"),Wt.textContent=rs,ql=p(),K.c(),_l=p(),y(lt.$$.fragment),Dl=p(),Bt=m("p"),Bt.innerHTML=os,Kl=p(),xt=m("p"),xt.innerHTML=ms,Ol=p(),Ht=m("p"),Ht.textContent=as,tn=p(),y(It.$$.fragment),en=p(),Nt=m("p"),Nt.innerHTML=fs,ln=p(),Vt=m("p"),Vt.innerHTML=us,nn=p(),y(Lt.$$.fragment),sn=p(),Xt=m("p"),Xt.innerHTML=Ms,pn=p(),y(Rt.$$.fragment),rn=p(),zt=m("p"),zt.innerHTML=cs,on=p(),Yt=m("p"),Yt.innerHTML=bs,mn=p(),y(At.$$.fragment),an=p(),Qt=m("p"),Qt.innerHTML=gs,fn=p(),y(St.$$.fragment),un=p(),Ft=m("p"),Ft.innerHTML=ys,Mn=p(),Et=m("ul"),Et.innerHTML=ds,cn=p(),Pt=m("p"),Pt.textContent=_s,bn=p(),y(qt.$$.fragment),gn=p(),Dt=m("p"),Dt.textContent=hs,yn=p(),Kt=m("p"),Kt.innerHTML=$s,dn=p(),nt=m("div"),nt.innerHTML=ws,_n=p(),Ot=m("p"),Ot.textContent=Ts,hn=p(),te=m("p"),te.textContent=Us,$n=p(),ee=m("p"),ee.textContent=js,wn=p(),it=m("div"),it.innerHTML=vs,Tn=p(),le=m("p"),le.textContent=ks,Un=p(),st=m("div"),st.innerHTML=Js,jn=p(),ne=m("p"),ne.textContent=Zs,vn=p(),ie=m("p"),ie.textContent=Cs,kn=p(),pt=m("div"),pt.innerHTML=Gs,Jn=p(),se=m("p"),se.textContent=Ws,Zn=p(),y(pe.$$.fragment),Cn=p(),re=m("p"),re.innerHTML=Bs,Gn=p(),oe=m("p"),oe.innerHTML=xs,Wn=p(),y(me.$$.fragment),Bn=p(),ae=m("p"),ae.innerHTML=Hs,xn=p(),y(fe.$$.fragment),Hn=p(),ue=m("p"),ue.innerHTML=Is,In=p(),Me=m("ul"),Me.innerHTML=Ns,Nn=p(),y(ce.$$.fragment),Vn=p(),be=m("p"),be.textContent=Vs,Ln=p(),ge=m("p"),ge.innerHTML=Ls,Xn=p(),ye=m("p"),ye.textContent=Xs,Rn=p(),y(de.$$.fragment),zn=p(),_e=m("p"),_e.innerHTML=Rs,Yn=p(),he=m("p"),he.textContent=zs,An=p(),y($e.$$.fragment),Qn=p(),we=m("p"),we.innerHTML=Ys,Sn=p(),Te=m("p"),Te.textContent=As,Fn=p(),Ue=m("p"),Ue.textContent=Qs,En=p(),y(je.$$.fragment),Pn=p(),ve=m("p"),ve.textContent=Ss,qn=p(),y(ke.$$.fragment),Dn=p(),Je=m("p"),Je.innerHTML=Fs,Kn=p(),y(Ze.$$.fragment),On=p(),Ce=m("p"),Ce.textContent=Es,ti=p(),y(Ge.$$.fragment),ei=p(),We=m("p"),We.textContent=Ps,li=p(),Be=m("p"),Be.innerHTML=qs,ni=p(),xe=m("p"),xe.textContent=Ds,ii=p(),y(He.$$.fragment),si=p(),y(Ie.$$.fragment),pi=p(),Ne=m("p"),Ne.textContent=Ks,ri=p(),y(Ve.$$.fragment),oi=p(),Le=m("p"),Le.innerHTML=Os,mi=p(),y(Xe.$$.fragment),ai=p(),Re=m("p"),Re.innerHTML=tp,fi=p(),y(ze.$$.fragment),ui=p(),y(Ye.$$.fragment),Mi=p(),Ae=m("p"),Ae.innerHTML=ep,ci=p(),Qe=m("p"),Qe.textContent=lp,bi=p(),Se=m("p"),Se.textContent=np,gi=p(),Y.c(),hl=p(),Fe=m("p"),Fe.textContent=ip,yi=p(),y(Ee.$$.fragment),di=p(),Q.c(),$l=p(),y(rt.$$.fragment),_i=p(),Pe=m("p"),Pe.innerHTML=sp,hi=p(),y(qe.$$.fragment),$i=p(),De=m("p"),De.textContent=pp,wi=p(),y(Ke.$$.fragment),Ti=p(),F.c(),wl=p(),Oe=m("p"),Oe.innerHTML=rp,Ui=p(),y(tl.$$.fragment),ji=p(),P.c(),Tl=p(),el=m("p"),el.textContent=op,vi=p(),y(ll.$$.fragment),ki=p(),D.c(),Ul=p(),nl=m("p"),nl.textContent=mp,Ji=p(),y(il.$$.fragment),Zi=p(),y(sl.$$.fragment),Ci=p(),O.c(),jl=p(),y(pl.$$.fragment),Gi=p(),vl=m("p"),this.h()},l(t){const e=Rp("svelte-u9bgzb",document.head);i=a(e,"META",{name:!0,content:!0}),e.forEach(l),o=r(t),s=a(t,"P",{}),Bp(s).forEach(l),M=r(t),d(T.$$.fragment,t),u=r(t),d(w.$$.fragment,t),C=r(t),d(v.$$.fragment,t),J=r(t),g.l(t),k=r(t),B=a(t,"P",{"data-svelte-h":!0}),f(B)!=="svelte-1c79ol8"&&(B.textContent=H),mt=r(t),d(x.$$.fragment,t),j=r(t),G=a(t,"P",{"data-svelte-h":!0}),f(G)!=="svelte-9tfkv9"&&(G.textContent=Qi),kl=r(t),at=a(t,"P",{"data-svelte-h":!0}),f(at)!=="svelte-v9f3jg"&&(at.textContent=Si),Jl=r(t),ft=a(t,"UL",{"data-svelte-h":!0}),f(ft)!=="svelte-1qo0jor"&&(ft.innerHTML=Fi),Zl=r(t),ut=a(t,"P",{"data-svelte-h":!0}),f(ut)!=="svelte-1d8sq3"&&(ut.textContent=Ei),Cl=r(t),d(Mt.$$.fragment,t),Gl=r(t),N.l(t),gl=r(t),ct=a(t,"P",{"data-svelte-h":!0}),f(ct)!=="svelte-s7lyez"&&(ct.innerHTML=Pi),Wl=r(t),bt=a(t,"P",{"data-svelte-h":!0}),f(bt)!=="svelte-q370c7"&&(bt.innerHTML=qi),Bl=r(t),d(gt.$$.fragment,t),xl=r(t),yt=a(t,"P",{"data-svelte-h":!0}),f(yt)!=="svelte-1czpzd5"&&(yt.textContent=Di),Hl=r(t),d(dt.$$.fragment,t),Il=r(t),_t=a(t,"P",{"data-svelte-h":!0}),f(_t)!=="svelte-17n3qpl"&&(_t.innerHTML=Ki),Nl=r(t),ht=a(t,"P",{"data-svelte-h":!0}),f(ht)!=="svelte-1025qld"&&(ht.textContent=Oi),Vl=r(t),L.l(t),yl=r(t),$t=a(t,"P",{"data-svelte-h":!0}),f($t)!=="svelte-1i72c8r"&&($t.innerHTML=ts),Ll=r(t),wt=a(t,"P",{"data-svelte-h":!0}),f(wt)!=="svelte-f7hgec"&&(wt.textContent=es),Xl=r(t),R.l(t),dl=r(t),Tt=a(t,"P",{"data-svelte-h":!0}),f(Tt)!=="svelte-881hi9"&&(Tt.innerHTML=ls),Rl=r(t),d(Ut.$$.fragment,t),zl=r(t),jt=a(t,"P",{"data-svelte-h":!0}),f(jt)!=="svelte-1iunjn9"&&(jt.innerHTML=ns),Yl=r(t),d(vt.$$.fragment,t),Al=r(t),kt=a(t,"P",{"data-svelte-h":!0}),f(kt)!=="svelte-1vmdaap"&&(kt.innerHTML=is),Ql=r(t),d(Jt.$$.fragment,t),Sl=r(t),Zt=a(t,"P",{"data-svelte-h":!0}),f(Zt)!=="svelte-xqmz8y"&&(Zt.innerHTML=ss),Fl=r(t),d(Ct.$$.fragment,t),El=r(t),Gt=a(t,"P",{"data-svelte-h":!0}),f(Gt)!=="svelte-1bsythw"&&(Gt.innerHTML=ps),Pl=r(t),Wt=a(t,"P",{"data-svelte-h":!0}),f(Wt)!=="svelte-lrxyvf"&&(Wt.textContent=rs),ql=r(t),K.l(t),_l=r(t),d(lt.$$.fragment,t),Dl=r(t),Bt=a(t,"P",{"data-svelte-h":!0}),f(Bt)!=="svelte-b3zd0n"&&(Bt.innerHTML=os),Kl=r(t),xt=a(t,"P",{"data-svelte-h":!0}),f(xt)!=="svelte-heur79"&&(xt.innerHTML=ms),Ol=r(t),Ht=a(t,"P",{"data-svelte-h":!0}),f(Ht)!=="svelte-1rwjouq"&&(Ht.textContent=as),tn=r(t),d(It.$$.fragment,t),en=r(t),Nt=a(t,"P",{"data-svelte-h":!0}),f(Nt)!=="svelte-18af9io"&&(Nt.innerHTML=fs),ln=r(t),Vt=a(t,"P",{"data-svelte-h":!0}),f(Vt)!=="svelte-xmqsqm"&&(Vt.innerHTML=us),nn=r(t),d(Lt.$$.fragment,t),sn=r(t),Xt=a(t,"P",{"data-svelte-h":!0}),f(Xt)!=="svelte-o6bydy"&&(Xt.innerHTML=Ms),pn=r(t),d(Rt.$$.fragment,t),rn=r(t),zt=a(t,"P",{"data-svelte-h":!0}),f(zt)!=="svelte-1uynags"&&(zt.innerHTML=cs),on=r(t),Yt=a(t,"P",{"data-svelte-h":!0}),f(Yt)!=="svelte-1szbfie"&&(Yt.innerHTML=bs),mn=r(t),d(At.$$.fragment,t),an=r(t),Qt=a(t,"P",{"data-svelte-h":!0}),f(Qt)!=="svelte-cx3mlc"&&(Qt.innerHTML=gs),fn=r(t),d(St.$$.fragment,t),un=r(t),Ft=a(t,"P",{"data-svelte-h":!0}),f(Ft)!=="svelte-1pr2lwl"&&(Ft.innerHTML=ys),Mn=r(t),Et=a(t,"UL",{"data-svelte-h":!0}),f(Et)!=="svelte-15nliwg"&&(Et.innerHTML=ds),cn=r(t),Pt=a(t,"P",{"data-svelte-h":!0}),f(Pt)!=="svelte-mwru74"&&(Pt.textContent=_s),bn=r(t),d(qt.$$.fragment,t),gn=r(t),Dt=a(t,"P",{"data-svelte-h":!0}),f(Dt)!=="svelte-dzsu3s"&&(Dt.textContent=hs),yn=r(t),Kt=a(t,"P",{"data-svelte-h":!0}),f(Kt)!=="svelte-1kv8vwp"&&(Kt.innerHTML=$s),dn=r(t),nt=a(t,"DIV",{class:!0,"data-svelte-h":!0}),f(nt)!=="svelte-4qsgxt"&&(nt.innerHTML=ws),_n=r(t),Ot=a(t,"P",{"data-svelte-h":!0}),f(Ot)!=="svelte-1117ide"&&(Ot.textContent=Ts),hn=r(t),te=a(t,"P",{"data-svelte-h":!0}),f(te)!=="svelte-qkums4"&&(te.textContent=Us),$n=r(t),ee=a(t,"P",{"data-svelte-h":!0}),f(ee)!=="svelte-1x48k8s"&&(ee.textContent=js),wn=r(t),it=a(t,"DIV",{class:!0,"data-svelte-h":!0}),f(it)!=="svelte-1xh6nig"&&(it.innerHTML=vs),Tn=r(t),le=a(t,"P",{"data-svelte-h":!0}),f(le)!=="svelte-j4gctk"&&(le.textContent=ks),Un=r(t),st=a(t,"DIV",{class:!0,"data-svelte-h":!0}),f(st)!=="svelte-1jm8l0p"&&(st.innerHTML=Js),jn=r(t),ne=a(t,"P",{"data-svelte-h":!0}),f(ne)!=="svelte-1xerycq"&&(ne.textContent=Zs),vn=r(t),ie=a(t,"P",{"data-svelte-h":!0}),f(ie)!=="svelte-n2tc0l"&&(ie.textContent=Cs),kn=r(t),pt=a(t,"DIV",{class:!0,"data-svelte-h":!0}),f(pt)!=="svelte-1kuf5jc"&&(pt.innerHTML=Gs),Jn=r(t),se=a(t,"P",{"data-svelte-h":!0}),f(se)!=="svelte-1ps9k07"&&(se.textContent=Ws),Zn=r(t),d(pe.$$.fragment,t),Cn=r(t),re=a(t,"P",{"data-svelte-h":!0}),f(re)!=="svelte-ksv2vm"&&(re.innerHTML=Bs),Gn=r(t),oe=a(t,"P",{"data-svelte-h":!0}),f(oe)!=="svelte-qk1ka7"&&(oe.innerHTML=xs),Wn=r(t),d(me.$$.fragment,t),Bn=r(t),ae=a(t,"P",{"data-svelte-h":!0}),f(ae)!=="svelte-ptoyjq"&&(ae.innerHTML=Hs),xn=r(t),d(fe.$$.fragment,t),Hn=r(t),ue=a(t,"P",{"data-svelte-h":!0}),f(ue)!=="svelte-1nrwexb"&&(ue.innerHTML=Is),In=r(t),Me=a(t,"UL",{"data-svelte-h":!0}),f(Me)!=="svelte-wpdb3h"&&(Me.innerHTML=Ns),Nn=r(t),d(ce.$$.fragment,t),Vn=r(t),be=a(t,"P",{"data-svelte-h":!0}),f(be)!=="svelte-86kk4d"&&(be.textContent=Vs),Ln=r(t),ge=a(t,"P",{"data-svelte-h":!0}),f(ge)!=="svelte-1f444n8"&&(ge.innerHTML=Ls),Xn=r(t),ye=a(t,"P",{"data-svelte-h":!0}),f(ye)!=="svelte-hv10js"&&(ye.textContent=Xs),Rn=r(t),d(de.$$.fragment,t),zn=r(t),_e=a(t,"P",{"data-svelte-h":!0}),f(_e)!=="svelte-1frvt07"&&(_e.innerHTML=Rs),Yn=r(t),he=a(t,"P",{"data-svelte-h":!0}),f(he)!=="svelte-2f38c7"&&(he.textContent=zs),An=r(t),d($e.$$.fragment,t),Qn=r(t),we=a(t,"P",{"data-svelte-h":!0}),f(we)!=="svelte-1qo3jbj"&&(we.innerHTML=Ys),Sn=r(t),Te=a(t,"P",{"data-svelte-h":!0}),f(Te)!=="svelte-16cn5q1"&&(Te.textContent=As),Fn=r(t),Ue=a(t,"P",{"data-svelte-h":!0}),f(Ue)!=="svelte-1qn3i01"&&(Ue.textContent=Qs),En=r(t),d(je.$$.fragment,t),Pn=r(t),ve=a(t,"P",{"data-svelte-h":!0}),f(ve)!=="svelte-1gynad1"&&(ve.textContent=Ss),qn=r(t),d(ke.$$.fragment,t),Dn=r(t),Je=a(t,"P",{"data-svelte-h":!0}),f(Je)!=="svelte-2ip8fy"&&(Je.innerHTML=Fs),Kn=r(t),d(Ze.$$.fragment,t),On=r(t),Ce=a(t,"P",{"data-svelte-h":!0}),f(Ce)!=="svelte-1n40fh7"&&(Ce.textContent=Es),ti=r(t),d(Ge.$$.fragment,t),ei=r(t),We=a(t,"P",{"data-svelte-h":!0}),f(We)!=="svelte-26idv9"&&(We.textContent=Ps),li=r(t),Be=a(t,"P",{"data-svelte-h":!0}),f(Be)!=="svelte-1gaw43z"&&(Be.innerHTML=qs),ni=r(t),xe=a(t,"P",{"data-svelte-h":!0}),f(xe)!=="svelte-sldxmk"&&(xe.textContent=Ds),ii=r(t),d(He.$$.fragment,t),si=r(t),d(Ie.$$.fragment,t),pi=r(t),Ne=a(t,"P",{"data-svelte-h":!0}),f(Ne)!=="svelte-59t3xy"&&(Ne.textContent=Ks),ri=r(t),d(Ve.$$.fragment,t),oi=r(t),Le=a(t,"P",{"data-svelte-h":!0}),f(Le)!=="svelte-16t88ic"&&(Le.innerHTML=Os),mi=r(t),d(Xe.$$.fragment,t),ai=r(t),Re=a(t,"P",{"data-svelte-h":!0}),f(Re)!=="svelte-144iuaf"&&(Re.innerHTML=tp),fi=r(t),d(ze.$$.fragment,t),ui=r(t),d(Ye.$$.fragment,t),Mi=r(t),Ae=a(t,"P",{"data-svelte-h":!0}),f(Ae)!=="svelte-1awv64g"&&(Ae.innerHTML=ep),ci=r(t),Qe=a(t,"P",{"data-svelte-h":!0}),f(Qe)!=="svelte-imq7dy"&&(Qe.textContent=lp),bi=r(t),Se=a(t,"P",{"data-svelte-h":!0}),f(Se)!=="svelte-13y4ux1"&&(Se.textContent=np),gi=r(t),Y.l(t),hl=r(t),Fe=a(t,"P",{"data-svelte-h":!0}),f(Fe)!=="svelte-46k05d"&&(Fe.textContent=ip),yi=r(t),d(Ee.$$.fragment,t),di=r(t),Q.l(t),$l=r(t),d(rt.$$.fragment,t),_i=r(t),Pe=a(t,"P",{"data-svelte-h":!0}),f(Pe)!=="svelte-rsq4pl"&&(Pe.innerHTML=sp),hi=r(t),d(qe.$$.fragment,t),$i=r(t),De=a(t,"P",{"data-svelte-h":!0}),f(De)!=="svelte-1ixsmh"&&(De.textContent=pp),wi=r(t),d(Ke.$$.fragment,t),Ti=r(t),F.l(t),wl=r(t),Oe=a(t,"P",{"data-svelte-h":!0}),f(Oe)!=="svelte-1oilp32"&&(Oe.innerHTML=rp),Ui=r(t),d(tl.$$.fragment,t),ji=r(t),P.l(t),Tl=r(t),el=a(t,"P",{"data-svelte-h":!0}),f(el)!=="svelte-n5c5jk"&&(el.textContent=op),vi=r(t),d(ll.$$.fragment,t),ki=r(t),D.l(t),Ul=r(t),nl=a(t,"P",{"data-svelte-h":!0}),f(nl)!=="svelte-th8p0"&&(nl.textContent=mp),Ji=r(t),d(il.$$.fragment,t),Zi=r(t),d(sl.$$.fragment,t),Ci=r(t),O.l(t),jl=r(t),d(pl.$$.fragment,t),Gi=r(t),vl=a(t,"P",{}),Bp(vl).forEach(l),this.h()},h(){W(i,"name","hf:doc:metadata"),W(i,"content",_r),W(nt,"class","flex justify-center"),W(it,"class","flex justify-center"),W(st,"class","flex justify-center"),W(pt,"class","flex justify-center")},m(t,e){zp(document.head,i),n(t,o,e),n(t,s,e),n(t,M,e),_(T,t,e),n(t,u,e),_(w,t,e),n(t,C,e),_(v,t,e),n(t,J,e),rl[Z].m(t,e),n(t,k,e),n(t,B,e),n(t,mt,e),_(x,t,e),n(t,j,e),n(t,G,e),n(t,kl,e),n(t,at,e),n(t,Jl,e),n(t,ft,e),n(t,Zl,e),n(t,ut,e),n(t,Cl,e),_(Mt,t,e),n(t,Gl,e),ol[I].m(t,e),n(t,gl,e),n(t,ct,e),n(t,Wl,e),n(t,bt,e),n(t,Bl,e),_(gt,t,e),n(t,xl,e),n(t,yt,e),n(t,Hl,e),_(dt,t,e),n(t,Il,e),n(t,_t,e),n(t,Nl,e),n(t,ht,e),n(t,Vl,e),ml[V].m(t,e),n(t,yl,e),n(t,$t,e),n(t,Ll,e),n(t,wt,e),n(t,Xl,e),al[X].m(t,e),n(t,dl,e),n(t,Tt,e),n(t,Rl,e),_(Ut,t,e),n(t,zl,e),n(t,jt,e),n(t,Yl,e),_(vt,t,e),n(t,Al,e),n(t,kt,e),n(t,Ql,e),_(Jt,t,e),n(t,Sl,e),n(t,Zt,e),n(t,Fl,e),_(Ct,t,e),n(t,El,e),n(t,Gt,e),n(t,Pl,e),n(t,Wt,e),n(t,ql,e),K.m(t,e),n(t,_l,e),_(lt,t,e),n(t,Dl,e),n(t,Bt,e),n(t,Kl,e),n(t,xt,e),n(t,Ol,e),n(t,Ht,e),n(t,tn,e),_(It,t,e),n(t,en,e),n(t,Nt,e),n(t,ln,e),n(t,Vt,e),n(t,nn,e),_(Lt,t,e),n(t,sn,e),n(t,Xt,e),n(t,pn,e),_(Rt,t,e),n(t,rn,e),n(t,zt,e),n(t,on,e),n(t,Yt,e),n(t,mn,e),_(At,t,e),n(t,an,e),n(t,Qt,e),n(t,fn,e),_(St,t,e),n(t,un,e),n(t,Ft,e),n(t,Mn,e),n(t,Et,e),n(t,cn,e),n(t,Pt,e),n(t,bn,e),_(qt,t,e),n(t,gn,e),n(t,Dt,e),n(t,yn,e),n(t,Kt,e),n(t,dn,e),n(t,nt,e),n(t,_n,e),n(t,Ot,e),n(t,hn,e),n(t,te,e),n(t,$n,e),n(t,ee,e),n(t,wn,e),n(t,it,e),n(t,Tn,e),n(t,le,e),n(t,Un,e),n(t,st,e),n(t,jn,e),n(t,ne,e),n(t,vn,e),n(t,ie,e),n(t,kn,e),n(t,pt,e),n(t,Jn,e),n(t,se,e),n(t,Zn,e),_(pe,t,e),n(t,Cn,e),n(t,re,e),n(t,Gn,e),n(t,oe,e),n(t,Wn,e),_(me,t,e),n(t,Bn,e),n(t,ae,e),n(t,xn,e),_(fe,t,e),n(t,Hn,e),n(t,ue,e),n(t,In,e),n(t,Me,e),n(t,Nn,e),_(ce,t,e),n(t,Vn,e),n(t,be,e),n(t,Ln,e),n(t,ge,e),n(t,Xn,e),n(t,ye,e),n(t,Rn,e),_(de,t,e),n(t,zn,e),n(t,_e,e),n(t,Yn,e),n(t,he,e),n(t,An,e),_($e,t,e),n(t,Qn,e),n(t,we,e),n(t,Sn,e),n(t,Te,e),n(t,Fn,e),n(t,Ue,e),n(t,En,e),_(je,t,e),n(t,Pn,e),n(t,ve,e),n(t,qn,e),_(ke,t,e),n(t,Dn,e),n(t,Je,e),n(t,Kn,e),_(Ze,t,e),n(t,On,e),n(t,Ce,e),n(t,ti,e),_(Ge,t,e),n(t,ei,e),n(t,We,e),n(t,li,e),n(t,Be,e),n(t,ni,e),n(t,xe,e),n(t,ii,e),_(He,t,e),n(t,si,e),_(Ie,t,e),n(t,pi,e),n(t,Ne,e),n(t,ri,e),_(Ve,t,e),n(t,oi,e),n(t,Le,e),n(t,mi,e),_(Xe,t,e),n(t,ai,e),n(t,Re,e),n(t,fi,e),_(ze,t,e),n(t,ui,e),_(Ye,t,e),n(t,Mi,e),n(t,Ae,e),n(t,ci,e),n(t,Qe,e),n(t,bi,e),n(t,Se,e),n(t,gi,e),fl[z].m(t,e),n(t,hl,e),n(t,Fe,e),n(t,yi,e),_(Ee,t,e),n(t,di,e),ul[A].m(t,e),n(t,$l,e),_(rt,t,e),n(t,_i,e),n(t,Pe,e),n(t,hi,e),_(qe,t,e),n(t,$i,e),n(t,De,e),n(t,wi,e),_(Ke,t,e),n(t,Ti,e),Ml[S].m(t,e),n(t,wl,e),n(t,Oe,e),n(t,Ui,e),_(tl,t,e),n(t,ji,e),cl[E].m(t,e),n(t,Tl,e),n(t,el,e),n(t,vi,e),_(ll,t,e),n(t,ki,e),bl[q].m(t,e),n(t,Ul,e),n(t,nl,e),n(t,Ji,e),_(il,t,e),n(t,Zi,e),_(sl,t,e),n(t,Ci,e),O.m(t,e),n(t,jl,e),_(pl,t,e),n(t,Gi,e),n(t,vl,e),Wi=!0},p(t,[e]){const Cp={};e&1&&(Cp.fw=t[0]),T.$set(Cp);let Hi=Z;Z=fp(t),Z!==Hi&&(et(),c(rl[Hi],1,1,()=>{rl[Hi]=null}),tt(),g=rl[Z],g||(g=rl[Z]=ap[Z](t),g.c()),b(g,1),g.m(k.parentNode,k));let Ii=I;I=Mp(t),I!==Ii&&(et(),c(ol[Ii],1,1,()=>{ol[Ii]=null}),tt(),N=ol[I],N||(N=ol[I]=up[I](t),N.c()),b(N,1),N.m(gl.parentNode,gl));let Ni=V;V=bp(t),V!==Ni&&(et(),c(ml[Ni],1,1,()=>{ml[Ni]=null}),tt(),L=ml[V],L||(L=ml[V]=cp[V](t),L.c()),b(L,1),L.m(yl.parentNode,yl));let Vi=X;X=yp(t),X!==Vi&&(et(),c(al[Vi],1,1,()=>{al[Vi]=null}),tt(),R=al[X],R||(R=al[X]=gp[X](t),R.c()),b(R,1),R.m(dl.parentNode,dl)),Bi!==(Bi=dp(t))&&(K.d(1),K=Bi(t),K&&(K.c(),K.m(_l.parentNode,_l)));const Gp={};e&2&&(Gp.$$scope={dirty:e,ctx:t}),lt.$set(Gp);let Li=z;z=hp(t),z!==Li&&(et(),c(fl[Li],1,1,()=>{fl[Li]=null}),tt(),Y=fl[z],Y||(Y=fl[z]=_p[z](t),Y.c()),b(Y,1),Y.m(hl.parentNode,hl));let Xi=A;A=wp(t),A!==Xi&&(et(),c(ul[Xi],1,1,()=>{ul[Xi]=null}),tt(),Q=ul[A],Q||(Q=ul[A]=$p[A](t),Q.c()),b(Q,1),Q.m($l.parentNode,$l));const Wp={};e&2&&(Wp.$$scope={dirty:e,ctx:t}),rt.$set(Wp);let Ri=S;S=Up(t),S!==Ri&&(et(),c(Ml[Ri],1,1,()=>{Ml[Ri]=null}),tt(),F=Ml[S],F||(F=Ml[S]=Tp[S](t),F.c()),b(F,1),F.m(wl.parentNode,wl));let zi=E;E=vp(t),E!==zi&&(et(),c(cl[zi],1,1,()=>{cl[zi]=null}),tt(),P=cl[E],P||(P=cl[E]=jp[E](t),P.c()),b(P,1),P.m(Tl.parentNode,Tl));let Yi=q;q=Jp(t),q!==Yi&&(et(),c(bl[Yi],1,1,()=>{bl[Yi]=null}),tt(),D=bl[q],D||(D=bl[q]=kp[q](t),D.c()),b(D,1),D.m(Ul.parentNode,Ul)),xi!==(xi=Zp(t))&&(O.d(1),O=xi(t),O&&(O.c(),O.m(jl.parentNode,jl)))},i(t){Wi||(b(T.$$.fragment,t),b(w.$$.fragment,t),b(v.$$.fragment,t),b(g),b(x.$$.fragment,t),b(Mt.$$.fragment,t),b(N),b(gt.$$.fragment,t),b(dt.$$.fragment,t),b(L),b(R),b(Ut.$$.fragment,t),b(vt.$$.fragment,t),b(Jt.$$.fragment,t),b(Ct.$$.fragment,t),b(lt.$$.fragment,t),b(It.$$.fragment,t),b(Lt.$$.fragment,t),b(Rt.$$.fragment,t),b(At.$$.fragment,t),b(St.$$.fragment,t),b(qt.$$.fragment,t),b(pe.$$.fragment,t),b(me.$$.fragment,t),b(fe.$$.fragment,t),b(ce.$$.fragment,t),b(de.$$.fragment,t),b($e.$$.fragment,t),b(je.$$.fragment,t),b(ke.$$.fragment,t),b(Ze.$$.fragment,t),b(Ge.$$.fragment,t),b(He.$$.fragment,t),b(Ie.$$.fragment,t),b(Ve.$$.fragment,t),b(Xe.$$.fragment,t),b(ze.$$.fragment,t),b(Ye.$$.fragment,t),b(Y),b(Ee.$$.fragment,t),b(Q),b(rt.$$.fragment,t),b(qe.$$.fragment,t),b(Ke.$$.fragment,t),b(F),b(tl.$$.fragment,t),b(P),b(ll.$$.fragment,t),b(D),b(il.$$.fragment,t),b(sl.$$.fragment,t),b(pl.$$.fragment,t),Wi=!0)},o(t){c(T.$$.fragment,t),c(w.$$.fragment,t),c(v.$$.fragment,t),c(g),c(x.$$.fragment,t),c(Mt.$$.fragment,t),c(N),c(gt.$$.fragment,t),c(dt.$$.fragment,t),c(L),c(R),c(Ut.$$.fragment,t),c(vt.$$.fragment,t),c(Jt.$$.fragment,t),c(Ct.$$.fragment,t),c(lt.$$.fragment,t),c(It.$$.fragment,t),c(Lt.$$.fragment,t),c(Rt.$$.fragment,t),c(At.$$.fragment,t),c(St.$$.fragment,t),c(qt.$$.fragment,t),c(pe.$$.fragment,t),c(me.$$.fragment,t),c(fe.$$.fragment,t),c(ce.$$.fragment,t),c(de.$$.fragment,t),c($e.$$.fragment,t),c(je.$$.fragment,t),c(ke.$$.fragment,t),c(Ze.$$.fragment,t),c(Ge.$$.fragment,t),c(He.$$.fragment,t),c(Ie.$$.fragment,t),c(Ve.$$.fragment,t),c(Xe.$$.fragment,t),c(ze.$$.fragment,t),c(Ye.$$.fragment,t),c(Y),c(Ee.$$.fragment,t),c(Q),c(rt.$$.fragment,t),c(qe.$$.fragment,t),c(Ke.$$.fragment,t),c(F),c(tl.$$.fragment,t),c(P),c(ll.$$.fragment,t),c(D),c(il.$$.fragment,t),c(sl.$$.fragment,t),c(pl.$$.fragment,t),Wi=!1},d(t){t&&(l(o),l(s),l(M),l(u),l(C),l(J),l(k),l(B),l(mt),l(j),l(G),l(kl),l(at),l(Jl),l(ft),l(Zl),l(ut),l(Cl),l(Gl),l(gl),l(ct),l(Wl),l(bt),l(Bl),l(xl),l(yt),l(Hl),l(Il),l(_t),l(Nl),l(ht),l(Vl),l(yl),l($t),l(Ll),l(wt),l(Xl),l(dl),l(Tt),l(Rl),l(zl),l(jt),l(Yl),l(Al),l(kt),l(Ql),l(Sl),l(Zt),l(Fl),l(El),l(Gt),l(Pl),l(Wt),l(ql),l(_l),l(Dl),l(Bt),l(Kl),l(xt),l(Ol),l(Ht),l(tn),l(en),l(Nt),l(ln),l(Vt),l(nn),l(sn),l(Xt),l(pn),l(rn),l(zt),l(on),l(Yt),l(mn),l(an),l(Qt),l(fn),l(un),l(Ft),l(Mn),l(Et),l(cn),l(Pt),l(bn),l(gn),l(Dt),l(yn),l(Kt),l(dn),l(nt),l(_n),l(Ot),l(hn),l(te),l($n),l(ee),l(wn),l(it),l(Tn),l(le),l(Un),l(st),l(jn),l(ne),l(vn),l(ie),l(kn),l(pt),l(Jn),l(se),l(Zn),l(Cn),l(re),l(Gn),l(oe),l(Wn),l(Bn),l(ae),l(xn),l(Hn),l(ue),l(In),l(Me),l(Nn),l(Vn),l(be),l(Ln),l(ge),l(Xn),l(ye),l(Rn),l(zn),l(_e),l(Yn),l(he),l(An),l(Qn),l(we),l(Sn),l(Te),l(Fn),l(Ue),l(En),l(Pn),l(ve),l(qn),l(Dn),l(Je),l(Kn),l(On),l(Ce),l(ti),l(ei),l(We),l(li),l(Be),l(ni),l(xe),l(ii),l(si),l(pi),l(Ne),l(ri),l(oi),l(Le),l(mi),l(ai),l(Re),l(fi),l(ui),l(Mi),l(Ae),l(ci),l(Qe),l(bi),l(Se),l(gi),l(hl),l(Fe),l(yi),l(di),l($l),l(_i),l(Pe),l(hi),l($i),l(De),l(wi),l(Ti),l(wl),l(Oe),l(Ui),l(ji),l(Tl),l(el),l(vi),l(ki),l(Ul),l(nl),l(Ji),l(Zi),l(Ci),l(jl),l(Gi),l(vl)),l(i),h(T,t),h(w,t),h(v,t),rl[Z].d(t),h(x,t),h(Mt,t),ol[I].d(t),h(gt,t),h(dt,t),ml[V].d(t),al[X].d(t),h(Ut,t),h(vt,t),h(Jt,t),h(Ct,t),K.d(t),h(lt,t),h(It,t),h(Lt,t),h(Rt,t),h(At,t),h(St,t),h(qt,t),h(pe,t),h(me,t),h(fe,t),h(ce,t),h(de,t),h($e,t),h(je,t),h(ke,t),h(Ze,t),h(Ge,t),h(He,t),h(Ie,t),h(Ve,t),h(Xe,t),h(ze,t),h(Ye,t),fl[z].d(t),h(Ee,t),ul[A].d(t),h(rt,t),h(qe,t),h(Ke,t),Ml[S].d(t),h(tl,t),cl[E].d(t),h(ll,t),bl[q].d(t),h(il,t),h(sl,t),O.d(t),h(pl,t)}}}const _r='{"title":"共享預訓練模型","local":"共享預訓練模型","sections":[{"title":"使用 push_to_hub API","local":"使用-pushtohub-api","sections":[],"depth":2},{"title":"使用 huggingface_hub python庫","local":"使用-huggingfacehub-python庫","sections":[],"depth":2},{"title":"使用網絡界面","local":"使用網絡界面","sections":[],"depth":2},{"title":"上傳模型文件","local":"上傳模型文件","sections":[{"title":"The upload_file approach","local":"the-uploadfile-approach","sections":[],"depth":3},{"title":"The Repository class","local":"the-repository-class","sections":[],"depth":3},{"title":"The git-based approach","local":"the-git-based-approach","sections":[],"depth":3}],"depth":2}],"depth":1}';function hr($,i,o){let s="pt";return Np(()=>{const M=new URLSearchParams(window.location.search);o(0,s=M.get("fw")||"pt")}),[s]}class Zr extends Lp{constructor(i){super(),Xp(this,i,hr,dr,Ip,{})}}export{Zr as component};
