Instructions to use samanehs/gpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use samanehs/gpt2 with KerasHub:
import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://samanehs/gpt2") - Keras
How to use samanehs/gpt2 with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://samanehs/gpt2") - Notebooks
- Google Colab
- Kaggle
keras-hub migration
#1
by martin-gorner - opened
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
library_name: keras-
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
---
|
| 5 |
** This Model Card has been manually edited **
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: keras-hub
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
---
|
| 5 |
** This Model Card has been manually edited **
|