Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"מבוא","local":"מבוא","sections":[{"title":"שימוש במחברת Google Colab","local":"שימוש-במחברת-google-colab","sections":[],"depth":2},{"title":"שימוש בסביבה וירטואלית של Python","local":"שימוש-בסביבה-וירטואלית-של-python","sections":[{"title":"התקנת dependencies","local":"התקנת-dependencies","sections":[],"depth":3}],"depth":2}],"depth":1}"> | |
| <link href="/docs/course/pr_1021/he/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload"> | |
| <link rel="modulepreload" href="/docs/course/pr_1021/he/_app/immutable/entry/start.ed3ac1bf.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1021/he/_app/immutable/chunks/scheduler.b108d059.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1021/he/_app/immutable/chunks/singletons.dfe2b960.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1021/he/_app/immutable/chunks/paths.40a0e092.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1021/he/_app/immutable/entry/app.90da6ca8.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1021/he/_app/immutable/chunks/index.77b310b1.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1021/he/_app/immutable/nodes/0.9502f9a3.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1021/he/_app/immutable/nodes/2.2540828e.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{"title":"מבוא","local":"מבוא","sections":[{"title":"שימוש במחברת Google Colab","local":"שימוש-במחברת-google-colab","sections":[],"depth":2},{"title":"שימוש בסביבה וירטואלית של Python","local":"שימוש-בסביבה-וירטואלית-של-python","sections":[{"title":"התקנת dependencies","local":"התקנת-dependencies","sections":[],"depth":3}],"depth":2}],"depth":1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <span dir="rtl" align="right"> <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-u95zz0">ברוכים הבאים לקורס של Hugging Face! מבוא זה ידריך אתכם בהתקנת סביבת העבודה. אם אתם רק מתחילים את הקורס, אנחנו ממליצים שקודם תעברו על <a href="https://huggingface.co/course/chapter1/1" rel="nofollow">פרק 1</a>, ואז תחזרו לכאן כדי להתקין את סביבת העבודה שלכם ותתנסו בכתיבת קוד בעצמכם.</p> <p data-svelte-h="svelte-jh3io9">כל הספריות בהן נשתמש בקורס זה זמינות כספריות Python, לכן כאן נראה לכם איך להקים סביבת עבודה של Python ואיך להתקין את הספריות הספציפיות שאותן תצטרכו.</p> <p data-svelte-h="svelte-uxb33b">נכסה שתי דרכים להקים את סביבת העבודה, שימוש במחברת Colab או בסביבת עבודה וירטואלית של Python. תרגישו חופשיים לבחור את השיטה שמתאימה לכם ביותר. עבור מתחילים, אנחנו ממליצים בחום שתתחילו בשימוש במחברת Colab.</p> <p data-svelte-h="svelte-a8fwls">שימו לב שלא נכסה שימוש במערת הפעלה Windows. אם אתם מריצים על Windows, אנחנו ממליצים להשתמש במחברות Colab. אם אתם משתמשים ב Linux או ב macOS, תוכלו לבחור באחת מהשיטות המוצעות כאן.</p> <p data-svelte-h="svelte-imlnmd">רוב הקורס מתבסס על כך שיש לכם חשבון 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-9tbiz0">שימוש במחברת Colab היא הדרך הפשוטה ביותר להתקנה; פתחו מחברת Colab בדפדפן שלכם ותתחילו לכתוב קוד!</p> <p data-svelte-h="svelte-60zaqr">אם אתם לא מכירים את Colab, אנחנו ממליצים שתתחילו לעבור על ה<a href="https://colab.research.google.com/notebooks/intro.ipynb" rel="nofollow">מבוא</a>. Colab מאפשר לעבוד על חומרה כמו GPUs או TPUs, והשירות ניתן בחינם לפרויקטים קטנים.</p> <p data-svelte-h="svelte-1q0byc5">כשאתם מרגישים בנוח לנווט ב Colab, פתחו מחברת חדשה והתחילו בהקמת הסביבה:</p> <div class="flex justify-center" data-svelte-h="svelte-604eqy"><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-18vnszn">הצעד הבא הוא התקנת כל הספריות שנצטרך בקורס. נשתמש ב <code>pip</code> להתקנה, שהוא מנהל החבילות ב Python. במחברות, אפשר להריץ פקודות מערכת ע”י כתיבה של <code>!</code> לפניהן, לכן אפשר להתקין את ספריית ה 🤗 Transformers בצורה הבאה:</p> <div dir="ltr" align="left"><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></div> <p data-svelte-h="svelte-dxuxl0">תוכלו לוודא שחבילה הותקנה בצהלחה על ידי ביצוע import שלה לסביבת הריצה שלכם:</p> <div dir="ltr" align="left"><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> <div class="flex justify-center" data-svelte-h="svelte-1cj51wg"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter0/install.gif" alt="A gif showing the result of the two commands above: installation and import" width="80%"></div> <p data-svelte-h="svelte-1lkli7z">פקודה זו מתקינה גרסה קלה מאוד של 🤗 Transformers. בפרט, לא מותקנות frameworks כגון PyTorch או TensorFlow. מכיוון שנשתמש בהרבה פיצ’רים של הספריה, אנחנו ממליצים להתקין את גרסת הפיתוח, שמגיעה עם כל ה dependencies הדרושים כמעט לכל תרחיש אפשרי:</p> <div dir="ltr" align="left"><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></div> <p data-svelte-h="svelte-zfitb">ההתקנה תמשך זמן מה, אבל לאחר מכן תהיו מוכנים לשאר הקורס.</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-ri6xgh">אם אתם מעדיפים להשתמש בסביבה וירטואלית של Python, הצעד הראשון יהיה להתקין Python במערכת שלכם. אנחנו ממליצים על <a href="https://realpython.com/installing-python/" rel="nofollow">המדריך הזה</a> כדי להתחיל.</p> <p data-svelte-h="svelte-1otq206">לאחר ש Python מותקן, אתם אמורים להצליח להריץ פקודות Python מהטרמינל. תוכלו להתחיל על ידי הרצה של הפקודה הבאה כדי לוודא שההתקנה הצליחה לפני שתעברו לשלבים הבאים: <code>python --version</code> . זה אמור להציג את גרסת ה Python שזמינה במערכת שלכם כרגע.</p> <p data-svelte-h="svelte-b2h3js">בהרצת פקודת Python בטרמינל, כמו <code>python --version</code>, מומלץ לחשוב על התוכנה שמריצה את הפקודות כ “Python” המרכזי במערכת שלכם. אנחנו ממליצים לשמור על ההתקנה המרכזית הזו נקייה מחבילות, ולהשתמש בה כדי ליצור סביבות נפרדות לכל יישום שתעבדו עליו - כך, לכל יישום יהיו החבילות וה dependencies שלה ולא תצטרכו לדאוג מבעיות תאימות עם יישומים אחרים.</p> <p data-svelte-h="svelte-h3lgnk">ב Python זה מבוצע בעזרת <a href="https://docs.python.org/3/tutorial/venv.html" rel="nofollow"><em>סביבות וירטואליות</em></a>, שהן עצי תיקיות עצמאיים וכל אחת מהן מכילה התקנת Python נפרדת עם כל החבילות שיישום צריך. יצירת סביבה וירטואלית יכולה להעשות בעזרת מגוון כלים, אנחנו נשתמש בחבילת ה 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-b114pg">תחילה, צרו את התיקייה בה תרצו שהיישום שלכם יחיה — לדוגמה, אולי תרצו ליצור תיקייה חדשה בשם <em>transformers-course</em> בשורש תיקייה הבית שלכם:</p> <div dir="ltr" align="left"><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></div> <p data-svelte-h="svelte-1a2ra7m">מתוך תיקייה זו, צרו סביבה וירטואלית על ידי שימוש במודול <code>venv</code>:</p> <div dir="ltr" align="left"><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></div> <p data-svelte-h="svelte-xf7tqc">עכשיו אמורה להיות לכם תיקייה בשם <em>env.</em> בתיקייה שהייתה ריקה מקודם:</p> <div dir="ltr" align="left"><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></div> <p data-svelte-h="svelte-1wzjyfy">תוכלו להכנס ולצאת מהסביבה הוירטואלית שלכם בעזרת הפקודות <code>activate</code> ו <code>deactivate</code> :</p> <div dir="ltr" align="left"><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"># Activate the virtual environment</span> | |
| <span class="hljs-built_in">source</span> .<span class="hljs-built_in">env</span>/bin/activate | |
| <span class="hljs-comment"># Deactivate the virtual environment</span> | |
| deactivate<!-- HTML_TAG_END --></pre></div></div> <p data-svelte-h="svelte-18fffmk">תוכלו לוודא שהסביבה הוירטואלית שלכם פעילה על ידי הרצת הפקודה <code>which python</code> : אם היא מצביעה על הסביבה הוירטואלית, אז הפעלתם אותה בהצלחה!</p> <div dir="ltr" align="left"><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><user><span class="hljs-regexp">/transformers-course/</span>.env<span class="hljs-regexp">/bin/</span>python<!-- HTML_TAG_END --></pre></div></div> <h3 class="relative group"><a id="התקנת-dependencies" 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="#התקנת-dependencies"><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>התקנת dependencies</span></h3> <p data-svelte-h="svelte-1hv18zj">בדומה לחלק על שימוש ב Google Colab, תצטרכו להתקין את החבילות הנדרשות להמשך. שוב, תוכלו להתקין את גרסת הפיתוח של 🤗 Transformers בעזרת מנהל החבילות <code>pip</code>:</p> <div dir="ltr" align="left"><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">"transformers[sentencepiece]"</span><!-- HTML_TAG_END --></pre></div></div> <p data-svelte-h="svelte-1mdogeo">עכשיו אתם מוכנים להמשך הקורס!</p></span> <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/he/chapter0/1.mdx" target="_blank"><span data-svelte-h="svelte-1kd6by1"><</span> <span data-svelte-h="svelte-x0xyl0">></span> <span data-svelte-h="svelte-1dajgef"><span class="underline ml-1.5">Update</span> on GitHub</span></a> <p></p> | |
| <script> | |
| { | |
| __sveltekit_128lme1 = { | |
| assets: "/docs/course/pr_1021/he", | |
| base: "/docs/course/pr_1021/he", | |
| env: {} | |
| }; | |
| const element = document.currentScript.parentElement; | |
| const data = [null,null]; | |
| Promise.all([ | |
| import("/docs/course/pr_1021/he/_app/immutable/entry/start.ed3ac1bf.js"), | |
| import("/docs/course/pr_1021/he/_app/immutable/entry/app.90da6ca8.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 2], | |
| data, | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 30.5 kB
- Xet hash:
- 85b506c3785d26360f1adc0634a2edfd14966958938ebcaad0a0b19f780b202e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.