MuRIL model error for tensorflow hub

Hello guys I am training MuRIL model for hindi language embedding using tensorflow and tensorflow hub. But I keep on getting this unknown error.

RuntimeError: Op type not registered ‘RegexSplitWithOffsets’ in binary running on 735f40a73d83. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib (e.g. tf.contrib.resampler), accessing should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.

The following is my code

Function for preprocessing the text

def preprocess_hindi(text_list) → List[int]:
“”“Returns the embeddings for the text provided as input”“”

text_input = tf.keras.layers.Input(shape = (), dtype = tf.string)

→ preprocessor = hub.KerasLayer( “MuRIL | Kaggle”)
encoder_input = preprocessor(text_input)
encoder = hub.KerasLayer(“MuRIL | Kaggle”, trainable = True)
output = encoder(encoder_input)
pooled_output = output[‘pooled_output’] # (batch_size,768)
sequence_output = output[‘sequence_output’] # (batch_size,seq_len,768)
embedding_model = tf.keras.Model(text_input,pooled_output)
embedding_output =
for sent in text_list:
model = embedding_model(tf.constant(sent))
embedding_output.append(model)

return embedding_output    

The symbol → is where I am getting the error . Can anybody explain me what this error is about
PS . tensorflow version is 2.15.1