Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
@@ -28,11 +28,38 @@ You can collaborate with your organization, upload and showcase your own models
|
|
28 |
>
|
29 |
<pre
|
30 |
class="break-words leading-1 whitespace-pre-line text-xs md:text-sm text-gray-800">
|
31 |
-
pip install huggingface-hub
|
32 |
!huggingface-cli login
|
33 |
from huggingface_hub.keras_mixin import push_to_hub_keras
|
34 |
push_to_hub_keras(model = model, repo_url = "https://huggingface.co/your-username/name-of-model")
|
35 |
</pre>
|
36 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
</div>
|
|
|
28 |
>
|
29 |
<pre
|
30 |
class="break-words leading-1 whitespace-pre-line text-xs md:text-sm text-gray-800">
|
31 |
+
!pip install huggingface-hub
|
32 |
!huggingface-cli login
|
33 |
from huggingface_hub.keras_mixin import push_to_hub_keras
|
34 |
push_to_hub_keras(model = model, repo_url = "https://huggingface.co/your-username/name-of-model")
|
35 |
</pre>
|
36 |
</div>
|
37 |
+
</p>
|
38 |
+
<div class="lg:col-span-3">
|
39 |
+
<p class="mb-4">
|
40 |
+
If you'd like to upload 🤗Transformers based Keras checkpoints and let us host your metrics interactively in the repo in with TensorBoard, use <a
|
41 |
+
href="https://huggingface.co/transformers/v4.12.5/_modules/transformers/keras_callbacks.html#PushToHubCallback"
|
42 |
+
>PushToHubCallback</a
|
43 |
+
>
|
44 |
+
like follows:
|
45 |
+
</p>
|
46 |
+
<div
|
47 |
+
class="p-4 bg-gradient-to-b from-gray-50-to-white border border-gray-100 rounded-lg relative mb-4"
|
48 |
+
>
|
49 |
+
<pre
|
50 |
+
class="break-words leading-1 whitespace-pre-line text-xs md:text-sm text-gray-800">
|
51 |
+
!pip install huggingface-hub
|
52 |
+
!huggingface-cli login
|
53 |
+
from transformers.keras_callbacks import PushToHubCallback
|
54 |
+
from tensorflow.keras.callbacks import TensorBoard as TensorboardCallback
|
55 |
+
tensorboard_callback = TensorBoard(log_dir = "./logs/tensorboard)
|
56 |
+
|
57 |
+
push_to_hub_callback = PushToHubCallback(output_dir="./logs", tokenizer=tokenizer,hub_model_id=model_id,)
|
58 |
+
|
59 |
+
callbacks = [tensorboard_callback, push_to_hub_callback]
|
60 |
+
model.fit(..., callbacks=callbacks, ...)
|
61 |
+
</pre>
|
62 |
+
|
63 |
+
</div>
|
64 |
|
65 |
</div>
|