Instructions to use keras/bert_tiny_en_uncased_sst2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/bert_tiny_en_uncased_sst2 with KerasHub:
import keras_hub # Load TextClassifier model text_classifier = keras_hub.models.TextClassifier.from_preset( "hf://keras/bert_tiny_en_uncased_sst2", num_classes=2, ) # Fine-tune text_classifier.fit(x=["Thilling adventure!", "Total snoozefest."], y=[1, 0]) # Classify text text_classifier.predict(["Not my cup of tea."])import keras_hub # Create a MaskedLM model task = keras_hub.models.MaskedLM.from_preset("hf://keras/bert_tiny_en_uncased_sst2")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/bert_tiny_en_uncased_sst2") - Keras
How to use keras/bert_tiny_en_uncased_sst2 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://keras/bert_tiny_en_uncased_sst2") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Update README.md with new model card content
Verified signatureefdc67e
-
Upload folder using huggingface_hub
Verified signature91ff790
-
Update README.md with new model card content
Verified signature7a6202c
-
Update README.md
Verified signature9524b00
-
Update README.md
Verified signatureb73a64c
-
Update README.md with new model card content
Verified signature055c50b
-
Update README.md with new model card content
Verified signature26efe9e -
Update README.md with new model card content
Verified signature0b1bd16 -
Update README.md with new model card content
Verified signature0790d24
-
Upload folder using huggingface_hub
Verified signaturea3925d1 -
initial commit
Verified signatureab3bc62