Machine Learning with Python Projects - Neural Network SMS Text Classifier

Tell us what’s happening:

The pre-set library imports are giving me an error.

Your code so far

import libraries

try:

%tensorflow_version only exists in Colab.

!pip uninstall -y tensorflow tensorflow-datasets ml-dtypes

!pip install tf-nightly tensorflow-datasets

except Exception:

pass

import tensorflow as tf

import pandas as pd

import keras # Import keras as a top-level package

import numpy as np

import matplotlib.pyplot as plt

print(tf.version)

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36

Challenge Information:

Machine Learning with Python Projects - Neural Network SMS Text Classifier

1 Like

If you’re using Google colab, Tensorflow libraries are already installed, so there’s no need to change them. If you’re installing any new libraries then use !pip install library_name at the top of your notebook. and a try-catch block is not always necessary. Good Luck!