Buckets:

rtrm's picture
download
raw
36.7 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;परिचय&quot;,&quot;local&quot;:&quot;परचय&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Google Colab नोटबुक प्रयोग गर्ने तरिका&quot;,&quot;local&quot;:&quot;google-colab-नटबक-परयग-गरन-तरक&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Python भर्चुअल इन्भाइरोमेन्ट प्रयोग&quot;,&quot;local&quot;:&quot;python-भरचअल-इनभइरमनट-परयग&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;डिपेन्डेन्सीहरू इन्स्टल गर्ने&quot;,&quot;local&quot;:&quot;डपनडनसहर-इनसटल-गरन&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2}],&quot;depth&quot;:1}">
<link href="/docs/course/pr_1007/ne/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload">
<link rel="modulepreload" href="/docs/course/pr_1007/ne/_app/immutable/entry/start.58e09e62.js">
<link rel="modulepreload" href="/docs/course/pr_1007/ne/_app/immutable/chunks/scheduler.048ce5c2.js">
<link rel="modulepreload" href="/docs/course/pr_1007/ne/_app/immutable/chunks/singletons.62b68090.js">
<link rel="modulepreload" href="/docs/course/pr_1007/ne/_app/immutable/chunks/paths.8cf1cd9b.js">
<link rel="modulepreload" href="/docs/course/pr_1007/ne/_app/immutable/entry/app.c22f711a.js">
<link rel="modulepreload" href="/docs/course/pr_1007/ne/_app/immutable/chunks/index.3c761ce0.js">
<link rel="modulepreload" href="/docs/course/pr_1007/ne/_app/immutable/nodes/0.0f2c3d98.js">
<link rel="modulepreload" href="/docs/course/pr_1007/ne/_app/immutable/chunks/each.e59479a4.js">
<link rel="modulepreload" href="/docs/course/pr_1007/ne/_app/immutable/nodes/2.4684f764.js">
<link rel="modulepreload" href="/docs/course/pr_1007/ne/_app/immutable/chunks/getInferenceSnippets.a88712dd.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;परिचय&quot;,&quot;local&quot;:&quot;परचय&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Google Colab नोटबुक प्रयोग गर्ने तरिका&quot;,&quot;local&quot;:&quot;google-colab-नटबक-परयग-गरन-तरक&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Python भर्चुअल इन्भाइरोमेन्ट प्रयोग&quot;,&quot;local&quot;:&quot;python-भरचअल-इनभइरमनट-परयग&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;डिपेन्डेन्सीहरू इन्स्टल गर्ने&quot;,&quot;local&quot;:&quot;डपनडनसहर-इनसटल-गरन&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2}],&quot;depth&quot;:1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <h1 class="relative group"><a id="परचय" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#परचय"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>परिचय</span></h1> <p data-svelte-h="svelte-12352u4">नमस्कार! Hugging Face कोर्समा स्वागत छ! यो परिचयले तपाईंलाई काम गर्ने वातावरण सेट गर्न सिकाउँछ। यदि तपाईं भर्खरै कोर्स सुरु गर्दै हुनुहुन्छ भने, हामी सुझाव दिन्छौं कि पहिले <a href="/course/chapter1">अध्याय १</a> हेर्नुहोस्, अनि फर्केर आफ्नो वातावरण सेट गर्नुहोस् ताकि तपाईं आफैं कोड गर्न सक्नुहुनेछ।</p> <p data-svelte-h="svelte-10wiij3">यो कोर्समा हामीले प्रयोग गर्ने सबै लाइब्रेरीहरू Python प्याकेजको रूपमा पाइन्छ। यहाँ हामी तपाईंलाई Python वातावरण कसरी सेट गर्ने र चाहिने लाइब्रेरीहरू कसरी इन्स्टल गर्ने भनेर देखाउँछौं।</p> <p data-svelte-h="svelte-102qtcr">तपाईंको काम गर्ने वातावरण सेट गर्न दुईवटा तरिका छन् - Colab नोटबुक वा Python भर्चुअल इन्भाइरोमेन्ट। जुन तरिका तपाईंलाई ठिक लाग्छ त्यही रोज्न सक्नुहुन्छ। नयाँ सिकारुहरूलाई चाहिँ Colab नोटबुकबाट सुरु गर्न सल्लाह दिन्छौं।</p> <p data-svelte-h="svelte-165d3to">याद गर्नुहोस्, हामी Windows सिस्टमको बारेमा केही बताउँदैनौं। Windows चलाइरहनुभएको छ भने Colab नोटबुक प्रयोग गर्नुहोस्। Linux वा macOS चलाइरहनुभएको छ भने माथिका दुवै तरिका प्रयोग गर्न सक्नुहुन्छ।</p> <p data-svelte-h="svelte-pwrhw4">यो कोर्सको धेरैजसो भागमा Hugging Face अकाउन्ट चाहिन्छ। अहिले नै एउटा बनाउनुहोस्: <a href="https://huggingface.co/join" rel="nofollow">अकाउन्ट बनाउनुहोस्</a></p> <h2 class="relative group"><a id="google-colab-नटबक-परयग-गरन-तरक" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#google-colab-नटबक-परयग-गरन-तरक"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Google Colab नोटबुक प्रयोग गर्ने तरिका</span></h2> <p data-svelte-h="svelte-vwzahg">Colab नोटबुक प्रयोग गर्नु सबैभन्दा सजिलो तरिका हो। ब्राउजरमा नोटबुक खोल्नुहोस् र सिधै कोडिङ सुरु गर्नुहोस्!</p> <p data-svelte-h="svelte-14w7a4">Colab बारे थाहा छैन भने, <a href="https://colab.research.google.com/notebooks/intro.ipynb" rel="nofollow">परिचय</a> हेरेर सुरु गर्नुहोस्। Colab मा GPUs वा TPUs जस्ता छिटो चल्ने हार्डवेयर पनि प्रयोग गर्न पाइन्छ, र साना कामहरूका लागि सित्तैमा पाइन्छ।</p> <p data-svelte-h="svelte-1uuu6ne">Colab मा काम गर्न सजिलो लाग्यो भने, नयाँ नोटबुक बनाएर सेटअप सुरु गर्नुहोस्।</p> <div class="flex justify-center" data-svelte-h="svelte-pln388"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter0/new_colab.png" alt="खाली Colab नोटबुक" width="80%"></div> <p data-svelte-h="svelte-1r4c8tj">अब हामीलाई चाहिने लाइब्रेरीहरू इन्स्टल गर्नुपर्छ। यसको लागि हामी Python को प्याकेज म्यानेजर <code>pip</code> प्रयोग गर्छौं। नोटबुकमा सिस्टम कमाण्डहरू चलाउन <code>!</code> चिन्ह लगाउनुपर्छ। त्यसैले 🤗 Transformers लाइब्रेरी यसरी इन्स्टल गर्न सकिन्छ:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->!pip <span class="hljs-keyword">install</span> transformers <!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1gx4res">लाइब्रेरी राम्रोसँग इन्स्टल भयो कि भएन जाँच गर्न Python मा import गरेर हेर्न सक्नुहुन्छ:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> transformers<!-- HTML_TAG_END --></pre></div> <div class="flex justify-center" data-svelte-h="svelte-t9vq72"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter0/install.gif" alt="माथिका दुई कमाण्डको नतिजा देखाउने GIF: installation र import" width="80%"></div> <p data-svelte-h="svelte-163kyrn">यसले 🤗 Transformers को सबैभन्दा हल्का भर्जन इन्स्टल गर्छ। यसमा PyTorch वा TensorFlow जस्ता मेशिन लर्निङ फ्रेमवर्कहरू समावेश हुँदैनन्। किनभने हामी लाइब्रेरीका धेरै फिचरहरू प्रयोग गर्नेछौं, हामी डेभलपमेन्ट भर्जन इन्स्टल गर्न सुझाव दिन्छौं, जसमा सबै आवश्यक डिपेन्डेन्सीहरू समावेश छन्:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->!pip <span class="hljs-keyword">install</span> transformers[sentencepiece] <!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-ru0tf7">यसले केही समय लिन्छ, तर त्यसपछि तपाईं कोर्सको बाँकी भागको लागि तयार हुनुहुनेछ!</p> <h2 class="relative group"><a id="python-भरचअल-इनभइरमनट-परयग" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#python-भरचअल-इनभइरमनट-परयग"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Python भर्चुअल इन्भाइरोमेन्ट प्रयोग</span></h2> <p data-svelte-h="svelte-sjmzu4">यदि तपाईं Python भर्चुअल इन्भाइरोमेन्ट प्रयोग गर्न चाहनुहुन्छ भने, पहिलो चरणमा आफ्नो सिस्टममा Python इन्स्टल गर्नुपर्छ। सुरु गर्नको लागि <a href="https://realpython.com/installing-python/" rel="nofollow">यो गाइड</a> हेर्न सुझाव दिन्छौं।</p> <p data-svelte-h="svelte-z3bxzu">Python इन्स्टल गरिसकेपछि, तपाईंले टर्मिनलमा Python कमाण्डहरू चलाउन सक्नुहुनेछ। सुरुमा यो कमाण्ड चलाएर Python ठीकसँग इन्स्टल भएको छ कि छैन जाँच गर्न सक्नुहुन्छ: <code>python --version</code>। यसले तपाईंको सिस्टममा भएको Python को भर्जन देखाउनुपर्छ।</p> <p data-svelte-h="svelte-l0zhnf">जब तपाईं <code>python --version</code> जस्तो कमाण्ड चलाउनुहुन्छ, त्यो तपाईंको सिस्टमको “मुख्य” Python ले चलाएको हो भन्ने बुझ्नुपर्छ। हामी सुझाव दिन्छौं कि यो मुख्य इन्स्टलेसनलाई खाली राख्नुहोस्, र हरेक एप्लिकेसनको लागि छुट्टै इन्भाइरोमेन्ट बनाउनुहोस् - यसरी हरेक एप्लिकेसनको आफ्नै डिपेन्डेन्सी र प्याकेजहरू हुन्छ र अरु एप्लिकेसनहरूसँग कम्प्याटिबिलिटी समस्या आउँदैन।</p> <p data-svelte-h="svelte-1h3brb3">Python मा यो <a href="https://docs.python.org/3/tutorial/venv.html" rel="nofollow"><em>भर्चुअल इन्भाइरोमेन्ट</em></a> को माध्यमबाट गरिन्छ, जुन एउटा छुट्टै डाइरेक्टरी हो जसमा निश्चित Python भर्जन र एप्लिकेसनलाई चाहिने सबै प्याकेजहरू हुन्छन्। यस्तो भर्चुअल इन्भाइरोमेन्ट धेरै टूलहरूले बनाउन सक्छन्, तर हामी<br>
अफिसियल Python प्याकेज <a href="https://docs.python.org/3/library/venv.html#module-venv" rel="nofollow"><code>venv</code></a> प्रयोग गर्छौं।</p> <p data-svelte-h="svelte-ww21gv">पहिले, आफ्नो एप्लिकेसन राख्ने डाइरेक्टरी बनाउनुहोस् - उदाहरणको लागि, होम डाइरेक्टरीमा <em>transformers-course</em> नामको नयाँ फोल्डर:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-built_in">mkdir</span> ~/transformers-course
<span class="hljs-built_in">cd</span> ~/transformers-course <!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-88987d">यो डाइरेक्टरीभित्र, Python को <code>venv</code> मोड्युल प्रयोग गरेर भर्चुअल इन्भाइरोमेन्ट बनाउनुहोस्:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-keyword">python</span> -m venv .<span class="hljs-keyword">env</span> <!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-8zwney">अब तपाईंको खाली फोल्डरमा <em>.env</em> नामको डाइरेक्टरी हुनुपर्छ:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-built_in">ls</span> -a <!-- HTML_TAG_END --></pre></div> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->. <span class="hljs-string">..</span> <span class="hljs-string">.env</span> <!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-18jm66l">तपाईं activate र deactivate स्क्रिप्टहरू प्रयोग गरेर भर्चुअल इन्भाइरोमेन्टमा प्रवेश र बाहिर निस्कन सक्नुहुन्छ:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-comment"># भर्चुअल इन्भाइरोमेन्ट सक्रिय गर्न </span>
<span class="hljs-built_in">source</span> .<span class="hljs-built_in">env</span>/bin/activate
<span class="hljs-comment"># भर्चुअल इन्भाइरोमेन्ट निष्क्रिय गर्न </span>
deactivate<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-tot679">इन्भाइरोमेन्ट सक्रिय भएको छ कि छैन जाँच गर्न <code>which python</code> कमाण्ड चलाउन सक्नुहुन्छ: यदि यसले भर्चुअल इन्भाइरोमेन्टतर्फ इंगित गर्छ भने, तपाईंले सफलतापूर्वक सक्रिय गर्नुभएको छ!</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-built_in">which</span> python <!-- HTML_TAG_END --></pre></div> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-regexp">/home/</span>&lt;user&gt;<span class="hljs-regexp">/transformers-course/</span>.env<span class="hljs-regexp">/bin/</span>python <!-- HTML_TAG_END --></pre></div> <h3 class="relative group"><a id="डपनडनसहर-इनसटल-गरन" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#डपनडनसहर-इनसटल-गरन"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>डिपेन्डेन्सीहरू इन्स्टल गर्ने</span></h3> <p data-svelte-h="svelte-13qgqgi">अघिल्लो Google Colab खण्डमा जस्तै, अब तपाईंले आवश्यक प्याकेजहरू इन्स्टल गर्नुपर्छ। फेरि पनि, pip प्याकेज म्यानेजर प्रयोग गरेर 🤗 Transformers को डेभलपमेन्ट भर्जन इन्स्टल गर्न सक्नुहुन्छ:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->pip <span class="hljs-keyword">install</span> <span class="hljs-string">&quot;transformers[sentencepiece]&quot;</span> <!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1qfg7nr">अब तपाईंको सेटअप पूरा भयो र तपाईं अगाडि बढ्न तयार हुनुहुन्छ!</p> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/course/blob/main/chapters/ne/chapter0/1.mdx" target="_blank"><span data-svelte-h="svelte-1kd6by1">&lt;</span> <span data-svelte-h="svelte-x0xyl0">&gt;</span> <span data-svelte-h="svelte-1dajgef"><span class="underline ml-1.5">Update</span> on GitHub</span></a> <p></p>
<script>
{
__sveltekit_1t5vcf1 = {
assets: "/docs/course/pr_1007/ne",
base: "/docs/course/pr_1007/ne",
env: {}
};
const element = document.currentScript.parentElement;
const data = [null,null];
Promise.all([
import("/docs/course/pr_1007/ne/_app/immutable/entry/start.58e09e62.js"),
import("/docs/course/pr_1007/ne/_app/immutable/entry/app.c22f711a.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 2],
data,
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
36.7 kB
·
Xet hash:
e47a1c4374cb0fd8c5fff59a00e390e5df5c26ec7973beaa9f67ebb9773639da

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.