Skip to content

Commit

Permalink
Keep TF Text as optional dependency (#2103)
Browse files Browse the repository at this point in the history
  • Loading branch information
abheesht17 authored Feb 19, 2025
1 parent 97fc29c commit 899805e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ To install the latest KerasHub release with Keras 3, simply run:
pip install --upgrade keras-hub
```

Our text tokenizers are based on TensorFlow Text. Hence, if you are using any
model which has language as a modality, you will have to run:

```
pip install --upgrade keras-hub[nlp]
```

To install the latest nightly changes for both KerasHub and Keras, you can use
our nightly package.

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ def get_version(rel_path):
"regex",
"rich",
"kagglehub",
"tensorflow-text",
],
extras_require={
"extras": [
"rouge-score",
"sentencepiece",
],
"nlp": ["tensorflow-text"],
},
# Supported Python versions
python_requires=">=3.9",
Expand Down

0 comments on commit 899805e

Please sign in to comment.