the saved model3 is not loading in the file, giving the below error:
Traceback (most recent call last):
File "app.py", line 28, in
model = tf.keras.models.load_model("C:\Users\Dell\Downloads\hate-speech-detection-main\hate-speech-detection-main\saved_models\model3")
File "C:\ProgramData\Anaconda3\envs\PythonTest\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\Dell\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\training\py_checkpoint_reader.py", line 67, in get_tensor
self, compat.as_bytes(tensor_str))
IndexError: Read fewer bytes than requested
Make sure that the TensorFlow version you're using is compatible with the version used to train the model (Tensorflow 2.10.0).
Ensure that the file path is correct and that you have read permissions for the file. You have twice "hate-speech-detection-main" in your file path, is that correct?
Use Python version 3.9, which was used in model development. You seem to be using Python 3.7.
the saved model3 is not loading in the file, giving the below error: Traceback (most recent call last): File "app.py", line 28, in
model = tf.keras.models.load_model("C:\Users\Dell\Downloads\hate-speech-detection-main\hate-speech-detection-main\saved_models\model3")
File "C:\ProgramData\Anaconda3\envs\PythonTest\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\Dell\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\training\py_checkpoint_reader.py", line 67, in get_tensor
self, compat.as_bytes(tensor_str))
IndexError: Read fewer bytes than requested