Spaces:
Running
Running
Jean Louis
commited on
Commit
·
b143197
1
Parent(s):
6656923
Updated index.html
Browse files- index.html +29 -23
index.html
CHANGED
|
@@ -57,15 +57,17 @@ and tools to download and use models from the Hugging Face Hub.</p>
|
|
| 57 |
|
| 58 |
<h6>Installation</h6>
|
| 59 |
|
| 60 |
-
<p>Run the following command in your terminal or command prompt
|
| 61 |
-
|
|
|
|
| 62 |
pip install transformers
|
| 63 |
</code></p>
|
| 64 |
|
| 65 |
<h6>Verify Installation</h6>
|
| 66 |
|
| 67 |
-
<p>To confirm the installation was successful, run
|
| 68 |
-
|
|
|
|
| 69 |
python -c "from transformers import pipeline; print('Installation successful!')"
|
| 70 |
</code></p>
|
| 71 |
|
|
@@ -77,15 +79,17 @@ python -c "from transformers import pipeline; print('Installation successful!')"
|
|
| 77 |
|
| 78 |
<h6>Installation</h6>
|
| 79 |
|
| 80 |
-
<p>Run the following command
|
| 81 |
-
|
|
|
|
| 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 |
-
|
|
|
|
| 89 |
huggingface-cli --help
|
| 90 |
</code></p>
|
| 91 |
|
|
@@ -99,22 +103,25 @@ huggingface-cli --help
|
|
| 99 |
|
| 100 |
<h6>Log in to Hugging Face</h6>
|
| 101 |
|
| 102 |
-
<p>To log in to your Hugging Face account
|
| 103 |
-
|
|
|
|
| 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 |
-
|
|
|
|
| 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 |
-
|
|
|
|
| 118 |
huggingface-cli --help
|
| 119 |
</code></p>
|
| 120 |
|
|
@@ -124,18 +131,17 @@ huggingface-cli --help
|
|
| 124 |
|
| 125 |
<p>Here’s an example of downloading and using a model in Python:</p>
|
| 126 |
|
| 127 |
-
<
|
| 128 |
-
from transformers import pipeline
|
| 129 |
-
|
| 130 |
-
<h1>Download and load a model</h1>
|
| 131 |
|
| 132 |
-
|
|
|
|
| 133 |
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
<p>output = generator(“Hello, how are you?”, max_length=50)
|
| 137 |
print(output)
|
| 138 |
-
|
|
|
|
| 139 |
|
| 140 |
<hr />
|
| 141 |
|
|
|
|
| 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 |
|
|
|
|
| 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 |
|
|
|
|
| 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 |
|
|
|
|
| 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 |
|