Jean Louis commited on
Commit
6656923
·
1 Parent(s): 6cd6f81

Updated index.html

Browse files
Files changed (1) hide show
  1. index.html +131 -0
index.html CHANGED
@@ -46,6 +46,137 @@ what makes <em>you</em> tick. Let&rsquo;s dive in together! 🎤💻✨</p>
46
 
47
  <h4>Prepare Python environment to download Hugging Face models</h4>
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  <h4>Install NVIDIA Canary-1B-Flash fully free software Large Language Model (LLM) for speech recognition</h4>
50
 
51
  <h4>Run NVIDIA Canary-1B-Flash as server</h4>
 
46
 
47
  <h4>Prepare Python environment to download Hugging Face models</h4>
48
 
49
+ <p>This guide will help you install the necessary Hugging Face packages
50
+ and tools to download and use models from the Hugging Face Hub.</p>
51
+
52
+ <hr />
53
+
54
+ <h5>1. Install <code>transformers</code> Package</h5>
55
+
56
+ <p>The <code>transformers</code> package is used to load and use Hugging Face models in Python.</p>
57
+
58
+ <h6>Installation</h6>
59
+
60
+ <p>Run the following command in your terminal or command prompt:
61
+ <code>bash
62
+ pip install transformers
63
+ </code></p>
64
+
65
+ <h6>Verify Installation</h6>
66
+
67
+ <p>To confirm the installation was successful, run:
68
+ <code>bash
69
+ python -c "from transformers import pipeline; print('Installation successful!')"
70
+ </code></p>
71
+
72
+ <hr />
73
+
74
+ <h5>2. Install <code>huggingface_hub</code> Package</h5>
75
+
76
+ <p>The <code>huggingface_hub</code> package provides the <code>huggingface-cli</code> tool for interacting with the Hugging Face Hub (e.g., downloading models, uploading files, etc.).</p>
77
+
78
+ <h6>Installation</h6>
79
+
80
+ <p>Run the following command:
81
+ <code>bash
82
+ pip install huggingface_hub
83
+ </code></p>
84
+
85
+ <h6>Verify Installation</h6>
86
+
87
+ <p>After installation, check if the <code>huggingface-cli</code> is available:
88
+ <code>bash
89
+ huggingface-cli --help
90
+ </code></p>
91
+
92
+ <hr />
93
+
94
+ <h5>3. Using <code>huggingface-cli</code></h5>
95
+
96
+ <p>The <code>huggingface-cli</code> tool allows you to interact with the Hugging Face Hub directly from the command line.</p>
97
+
98
+ <h6>Common Commands</h6>
99
+
100
+ <h6>Log in to Hugging Face</h6>
101
+
102
+ <p>To log in to your Hugging Face account:
103
+ <code>bash
104
+ huggingface-cli login
105
+ </code></p>
106
+
107
+ <h6>Download a Model</h6>
108
+
109
+ <p>To download a model (e.g., <code>gpt2</code>):
110
+ <code>bash
111
+ huggingface-cli download gpt2
112
+ </code></p>
113
+
114
+ <h6>List Available Commands</h6>
115
+
116
+ <p>To see all available commands and options:
117
+ <code>bash
118
+ huggingface-cli --help
119
+ </code></p>
120
+
121
+ <hr />
122
+
123
+ <h5>4. Example: Download and Use a Model</h5>
124
+
125
+ <p>Here’s an example of downloading and using a model in Python:</p>
126
+
127
+ <p>```python
128
+ from transformers import pipeline</p>
129
+
130
+ <h1>Download and load a model</h1>
131
+
132
+ <p>generator = pipeline(&ldquo;text-generation&rdquo;, model=&ldquo;gpt2&rdquo;)</p>
133
+
134
+ <h1>Generate text</h1>
135
+
136
+ <p>output = generator(&ldquo;Hello, how are you?&rdquo;, max_length=50)
137
+ print(output)
138
+ ```</p>
139
+
140
+ <hr />
141
+
142
+ <h5>5. Summary of Commands</h5>
143
+
144
+ <table>
145
+ <thead>
146
+ <tr>
147
+ <th> Command </th>
148
+ <th> Description </th>
149
+ </tr>
150
+ </thead>
151
+ <tbody>
152
+ <tr>
153
+ <td> <code>pip install transformers</code> </td>
154
+ <td> Install the <code>transformers</code> package. </td>
155
+ </tr>
156
+ <tr>
157
+ <td> <code>pip install huggingface_hub</code> </td>
158
+ <td> Install the <code>huggingface_hub</code> package. </td>
159
+ </tr>
160
+ <tr>
161
+ <td> <code>huggingface-cli --help</code> </td>
162
+ <td> List all available <code>huggingface-cli</code> commands. </td>
163
+ </tr>
164
+ <tr>
165
+ <td> <code>huggingface-cli login</code> </td>
166
+ <td> Log in to your Hugging Face account. </td>
167
+ </tr>
168
+ <tr>
169
+ <td> <code>huggingface-cli download gpt2</code> </td>
170
+ <td> Download the <code>gpt2</code> model. </td>
171
+ </tr>
172
+ </tbody>
173
+ </table>
174
+
175
+
176
+ <hr />
177
+
178
+ <p>Now you’re ready to use Hugging Face models and tools in Python! 🚀</p>
179
+
180
  <h4>Install NVIDIA Canary-1B-Flash fully free software Large Language Model (LLM) for speech recognition</h4>
181
 
182
  <h4>Run NVIDIA Canary-1B-Flash as server</h4>