Spaces:
Running
Running
Jean Louis
commited on
Commit
·
9992bad
1
Parent(s):
ccf3203
Updated HTML files
Browse files- 01-prepare-python.html +151 -0
- README.html +26 -0
- index.html +0 -139
01-prepare-python.html
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional //EN">
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<meta name="GENERATOR" content="mkd2html 2.2.7 GITHUB_CHECKBOX">
|
5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
+
<link rel="stylesheet"
|
7 |
+
type="text/css"
|
8 |
+
href="header.css" />
|
9 |
+
<title></title>
|
10 |
+
</head>
|
11 |
+
<body>
|
12 |
+
<h1>Prepare Python environment to download Hugging Face models</h1>
|
13 |
+
|
14 |
+
<p>This guide will help you install the necessary Hugging Face packages
|
15 |
+
and tools to download and use models from the Hugging Face Hub.</p>
|
16 |
+
|
17 |
+
<hr />
|
18 |
+
|
19 |
+
<h2>1. Install <code>transformers</code> Package</h2>
|
20 |
+
|
21 |
+
<p>The <code>transformers</code> package is used to load and use Hugging Face models in Python.</p>
|
22 |
+
|
23 |
+
<h3>Installation</h3>
|
24 |
+
|
25 |
+
<p>Run the following command in your terminal or command prompt:</p>
|
26 |
+
|
27 |
+
<p><code>bash
|
28 |
+
pip install transformers
|
29 |
+
</code></p>
|
30 |
+
|
31 |
+
<h3>Verify Installation</h3>
|
32 |
+
|
33 |
+
<p>To confirm the installation was successful, run:</p>
|
34 |
+
|
35 |
+
<p><code>bash
|
36 |
+
python -c "from transformers import pipeline; print('Installation successful!')"
|
37 |
+
</code></p>
|
38 |
+
|
39 |
+
<hr />
|
40 |
+
|
41 |
+
<h2>2. Install <code>huggingface_hub</code> Package</h2>
|
42 |
+
|
43 |
+
<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>
|
44 |
+
|
45 |
+
<h3>Installation</h3>
|
46 |
+
|
47 |
+
<p>Run the following command:</p>
|
48 |
+
|
49 |
+
<p><code>bash
|
50 |
+
pip install huggingface_hub
|
51 |
+
</code></p>
|
52 |
+
|
53 |
+
<h3>Verify Installation</h3>
|
54 |
+
|
55 |
+
<p>After installation, check if the <code>huggingface-cli</code> is available:</p>
|
56 |
+
|
57 |
+
<p><code>bash
|
58 |
+
huggingface-cli --help
|
59 |
+
</code></p>
|
60 |
+
|
61 |
+
<hr />
|
62 |
+
|
63 |
+
<h2>3. Using <code>huggingface-cli</code></h2>
|
64 |
+
|
65 |
+
<p>The <code>huggingface-cli</code> tool allows you to interact with the Hugging Face Hub directly from the command line.</p>
|
66 |
+
|
67 |
+
<h3>Common Commands</h3>
|
68 |
+
|
69 |
+
<h3>Log in to Hugging Face</h3>
|
70 |
+
|
71 |
+
<p>To log in to your Hugging Face account:</p>
|
72 |
+
|
73 |
+
<p><code>bash
|
74 |
+
huggingface-cli login
|
75 |
+
</code></p>
|
76 |
+
|
77 |
+
<h3>Download a Model</h3>
|
78 |
+
|
79 |
+
<p>To download a model (e.g., <code>gpt2</code>):</p>
|
80 |
+
|
81 |
+
<p><code>bash
|
82 |
+
huggingface-cli download gpt2
|
83 |
+
</code></p>
|
84 |
+
|
85 |
+
<h3>List Available Commands</h3>
|
86 |
+
|
87 |
+
<p>To see all available commands and options:</p>
|
88 |
+
|
89 |
+
<p><code>bash
|
90 |
+
huggingface-cli --help
|
91 |
+
</code></p>
|
92 |
+
|
93 |
+
<hr />
|
94 |
+
|
95 |
+
<h2>4. Example: Download and Use a Model</h2>
|
96 |
+
|
97 |
+
<p>Here’s an example of downloading and using a model in Python:</p>
|
98 |
+
|
99 |
+
<pre>
|
100 |
+
from transformers import pipeline
|
101 |
+
|
102 |
+
# Download and load a model
|
103 |
+
generator = pipeline("text-generation", model="gpt2")
|
104 |
+
|
105 |
+
# Generate text
|
106 |
+
output = generator("Hello, how are you?", max_length=50)
|
107 |
+
print(output)
|
108 |
+
</pre>
|
109 |
+
|
110 |
+
|
111 |
+
<hr />
|
112 |
+
|
113 |
+
<h2>5. Summary of Commands</h2>
|
114 |
+
|
115 |
+
<table>
|
116 |
+
<thead>
|
117 |
+
<tr>
|
118 |
+
<th> Command </th>
|
119 |
+
<th> Description </th>
|
120 |
+
</tr>
|
121 |
+
</thead>
|
122 |
+
<tbody>
|
123 |
+
<tr>
|
124 |
+
<td> <code>pip install transformers</code> </td>
|
125 |
+
<td> Install the <code>transformers</code> package. </td>
|
126 |
+
</tr>
|
127 |
+
<tr>
|
128 |
+
<td> <code>pip install huggingface_hub</code> </td>
|
129 |
+
<td> Install the <code>huggingface_hub</code> package. </td>
|
130 |
+
</tr>
|
131 |
+
<tr>
|
132 |
+
<td> <code>huggingface-cli --help</code> </td>
|
133 |
+
<td> List all available <code>huggingface-cli</code> commands. </td>
|
134 |
+
</tr>
|
135 |
+
<tr>
|
136 |
+
<td> <code>huggingface-cli login</code> </td>
|
137 |
+
<td> Log in to your Hugging Face account. </td>
|
138 |
+
</tr>
|
139 |
+
<tr>
|
140 |
+
<td> <code>huggingface-cli download gpt2</code> </td>
|
141 |
+
<td> Download the <code>gpt2</code> model. </td>
|
142 |
+
</tr>
|
143 |
+
</tbody>
|
144 |
+
</table>
|
145 |
+
|
146 |
+
|
147 |
+
<hr />
|
148 |
+
|
149 |
+
<p>Now you’re ready to use Hugging Face models and tools in Python! 🚀</p>
|
150 |
+
</body>
|
151 |
+
</html>
|
README.html
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional //EN">
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<meta name="GENERATOR" content="mkd2html 2.2.7 GITHUB_CHECKBOX">
|
5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
+
<link rel="stylesheet"
|
7 |
+
type="text/css"
|
8 |
+
href="header.css" />
|
9 |
+
<title></title>
|
10 |
+
</head>
|
11 |
+
<body>
|
12 |
+
<hr />
|
13 |
+
|
14 |
+
<p>title: GNU LLM Integration
|
15 |
+
emoji: 🌖
|
16 |
+
colorFrom: purple
|
17 |
+
colorTo: pink
|
18 |
+
sdk: static
|
19 |
+
pinned: false
|
20 |
+
license: gpl-3.0</p>
|
21 |
+
|
22 |
+
<h2>short_description: Empowering GNU/Linux users with NLP</h2>
|
23 |
+
|
24 |
+
<p>Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference</p>
|
25 |
+
</body>
|
26 |
+
</html>
|
index.html
CHANGED
@@ -44,145 +44,6 @@ what makes <em>you</em> tick. Let’s dive in together! 🎤💻✨</p>
|
|
44 |
|
45 |
<h3>Install required software</h3>
|
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:</p>
|
61 |
-
|
62 |
-
<p><code>bash
|
63 |
-
pip install transformers
|
64 |
-
</code></p>
|
65 |
-
|
66 |
-
<h6>Verify Installation</h6>
|
67 |
-
|
68 |
-
<p>To confirm the installation was successful, run:</p>
|
69 |
-
|
70 |
-
<p><code>bash
|
71 |
-
python -c "from transformers import pipeline; print('Installation successful!')"
|
72 |
-
</code></p>
|
73 |
-
|
74 |
-
<hr />
|
75 |
-
|
76 |
-
<h5>2. Install <code>huggingface_hub</code> Package</h5>
|
77 |
-
|
78 |
-
<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>
|
79 |
-
|
80 |
-
<h6>Installation</h6>
|
81 |
-
|
82 |
-
<p>Run the following command:</p>
|
83 |
-
|
84 |
-
<p><code>bash
|
85 |
-
pip install huggingface_hub
|
86 |
-
</code></p>
|
87 |
-
|
88 |
-
<h6>Verify Installation</h6>
|
89 |
-
|
90 |
-
<p>After installation, check if the <code>huggingface-cli</code> is available:</p>
|
91 |
-
|
92 |
-
<p><code>bash
|
93 |
-
huggingface-cli --help
|
94 |
-
</code></p>
|
95 |
-
|
96 |
-
<hr />
|
97 |
-
|
98 |
-
<h5>3. Using <code>huggingface-cli</code></h5>
|
99 |
-
|
100 |
-
<p>The <code>huggingface-cli</code> tool allows you to interact with the Hugging Face Hub directly from the command line.</p>
|
101 |
-
|
102 |
-
<h6>Common Commands</h6>
|
103 |
-
|
104 |
-
<h6>Log in to Hugging Face</h6>
|
105 |
-
|
106 |
-
<p>To log in to your Hugging Face account:</p>
|
107 |
-
|
108 |
-
<p><code>bash
|
109 |
-
huggingface-cli login
|
110 |
-
</code></p>
|
111 |
-
|
112 |
-
<h6>Download a Model</h6>
|
113 |
-
|
114 |
-
<p>To download a model (e.g., <code>gpt2</code>):</p>
|
115 |
-
|
116 |
-
<p><code>bash
|
117 |
-
huggingface-cli download gpt2
|
118 |
-
</code></p>
|
119 |
-
|
120 |
-
<h6>List Available Commands</h6>
|
121 |
-
|
122 |
-
<p>To see all available commands and options:</p>
|
123 |
-
|
124 |
-
<p><code>bash
|
125 |
-
huggingface-cli --help
|
126 |
-
</code></p>
|
127 |
-
|
128 |
-
<hr />
|
129 |
-
|
130 |
-
<h5>4. Example: Download and Use a Model</h5>
|
131 |
-
|
132 |
-
<p>Here’s an example of downloading and using a model in Python:</p>
|
133 |
-
|
134 |
-
<pre>
|
135 |
-
from transformers import pipeline
|
136 |
-
|
137 |
-
# Download and load a model
|
138 |
-
generator = pipeline("text-generation", model="gpt2")
|
139 |
-
|
140 |
-
# Generate text
|
141 |
-
output = generator("Hello, how are you?", max_length=50)
|
142 |
-
print(output)
|
143 |
-
</pre>
|
144 |
-
|
145 |
-
|
146 |
-
<hr />
|
147 |
-
|
148 |
-
<h5>5. Summary of Commands</h5>
|
149 |
-
|
150 |
-
<table>
|
151 |
-
<thead>
|
152 |
-
<tr>
|
153 |
-
<th> Command </th>
|
154 |
-
<th> Description </th>
|
155 |
-
</tr>
|
156 |
-
</thead>
|
157 |
-
<tbody>
|
158 |
-
<tr>
|
159 |
-
<td> <code>pip install transformers</code> </td>
|
160 |
-
<td> Install the <code>transformers</code> package. </td>
|
161 |
-
</tr>
|
162 |
-
<tr>
|
163 |
-
<td> <code>pip install huggingface_hub</code> </td>
|
164 |
-
<td> Install the <code>huggingface_hub</code> package. </td>
|
165 |
-
</tr>
|
166 |
-
<tr>
|
167 |
-
<td> <code>huggingface-cli --help</code> </td>
|
168 |
-
<td> List all available <code>huggingface-cli</code> commands. </td>
|
169 |
-
</tr>
|
170 |
-
<tr>
|
171 |
-
<td> <code>huggingface-cli login</code> </td>
|
172 |
-
<td> Log in to your Hugging Face account. </td>
|
173 |
-
</tr>
|
174 |
-
<tr>
|
175 |
-
<td> <code>huggingface-cli download gpt2</code> </td>
|
176 |
-
<td> Download the <code>gpt2</code> model. </td>
|
177 |
-
</tr>
|
178 |
-
</tbody>
|
179 |
-
</table>
|
180 |
-
|
181 |
-
|
182 |
-
<hr />
|
183 |
-
|
184 |
-
<p>Now you’re ready to use Hugging Face models and tools in Python! 🚀</p>
|
185 |
-
|
186 |
<h4>Install NVIDIA Canary-1B-Flash fully free software Large Language Model (LLM) for speech recognition</h4>
|
187 |
|
188 |
<h4>Run NVIDIA Canary-1B-Flash as server</h4>
|
|
|
44 |
|
45 |
<h3>Install required software</h3>
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
<h4>Install NVIDIA Canary-1B-Flash fully free software Large Language Model (LLM) for speech recognition</h4>
|
48 |
|
49 |
<h4>Run NVIDIA Canary-1B-Flash as server</h4>
|