Skip to content

Instantly share code, notes, and snippets.

@shayaf84
Last active February 20, 2022 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shayaf84/c2a22909228143f6819be23360779926 to your computer and use it in GitHub Desktop.
Save shayaf84/c2a22909228143f6819be23360779926 to your computer and use it in GitHub Desktop.
!pip install tensorflow-text
import tensorflow_hub as hub
import tensorflow_text as text
#Use the bert preprocesser and bert encoder from tensorflow_hub
bert_preprocess = hub.KerasLayer("https://tfhub.dev/tensorflow/bert_en_uncased_preprocess/3")
bert_encoder = hub.KerasLayer('https://tfhub.dev/tensorflow/bert_en_uncased_L-12_H-768_A-12/4')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment