Instructions to use keras/bart_base_en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/bart_base_en with KerasHub:
import keras_hub # Create a Seq2SeqLM model task = keras_hub.models.Seq2SeqLM.from_preset("hf://keras/bart_base_en")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/bart_base_en") - Keras
How to use keras/bart_base_en 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/bart_base_en") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
| 1 |
---
|
| 2 |
library_name: keras-hub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
## Model Overview
|
| 5 |
BART encoder-decoder network.
|
|
@@ -200,4 +206,4 @@ bart_lm = keras_hub.models.BartSeq2SeqLM.from_preset(
|
|
| 200 |
preprocessor=None,
|
| 201 |
)
|
| 202 |
bart_lm.fit(x=x, y=y, sample_weight=sw, batch_size=2)
|
| 203 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
library_name: keras-hub
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
tags:
|
| 7 |
+
- keras
|
| 8 |
+
- text-classification
|
| 9 |
---
|
| 10 |
## Model Overview
|
| 11 |
BART encoder-decoder network.
|
|
|
|
| 206 |
preprocessor=None,
|
| 207 |
)
|
| 208 |
bart_lm.fit(x=x, y=y, sample_weight=sw, batch_size=2)
|
| 209 |
+
```
|