Tell us what’s happening:
Getting the following error trying to run the notebook:
https://colab.research.google.com/drive/1ysEKrw_LE2jMndo1snrZUh5w87LQsCxk
----> 4 tokens = keras.preprocessing.text.text_to_word_sequence(text)
5 tokens = [word_index[word] if word in word_index else 0 for word in tokens]
6 return sequence.pad_sequences([tokens], MAXLEN)[0]
AttributeError: module 'keras.preprocessing' has no attribute 'text'
Most of the info I could find is saying that these modules and functions are deprecated, and they are posts from 4 years ago or longer.
I tried downgrading keras from 3.4.1 to 2.2.0 but that broke other imports.
Any advice appreciated, otherwise I’ll just continue with the video and skip trying to make this notebook work.
Challenge Information:
TensorFlow - Natural Language Processing With RNNs: Making Predictions