Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
@@ -101,32 +101,5 @@ from huggingface_hub.keras_mixin import from_pretrained_keras
|
|
101 |
from_pretrained_keras("your-username/your-awesome-model)
|
102 |
</pre>
|
103 |
</div>
|
104 |
-
<div class="lg:col-span-1">
|
105 |
-
<p class="mb-4">
|
106 |
-
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
|
107 |
-
href="https://huggingface.co/transformers/v4.12.5/_modules/transformers/keras_callbacks.html#PushToHubCallback"
|
108 |
-
>PushToHubCallback</a
|
109 |
-
>
|
110 |
-
like follows:
|
111 |
-
</p>
|
112 |
-
<div
|
113 |
-
class="p-4 bg-gradient-to-b from-gray-50-to-white border border-gray-100 rounded-lg relative mb-4"
|
114 |
-
>
|
115 |
-
<pre
|
116 |
-
class="break-words leading-1 whitespace-pre-line text-xs md:text-sm text-gray-800">
|
117 |
-
!pip install huggingface-hub
|
118 |
-
!huggingface-cli login
|
119 |
-
|
120 |
-
from transformers.keras_callbacks import PushToHubCallback
|
121 |
-
from tensorflow.keras.callbacks import TensorBoard
|
122 |
-
tensorboard_callback = TensorBoard(log_dir = "./logs/tensorboard")
|
123 |
-
|
124 |
-
push_to_hub_callback = PushToHubCallback(output_dir="./logs",
|
125 |
-
tokenizer=tokenizer,
|
126 |
-
hub_model_id=model_id)
|
127 |
-
|
128 |
-
callbacks = [tensorboard_callback, push_to_hub_callback]
|
129 |
-
model.fit(..., callbacks=callbacks, ...)
|
130 |
-
</pre>
|
131 |
|
132 |
</div>
|
|
|
101 |
from_pretrained_keras("your-username/your-awesome-model)
|
102 |
</pre>
|
103 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
</div>
|