JensBender / hate-speech-detection

Employing deep learning techniques to train and deploy a hate speech detection model for social media comments.
MIT License
4 stars 4 forks source link

model is not loading #2

Open VijayKrishna99 opened 2 months ago

VijayKrishna99 commented 2 months ago

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

JensBender commented 2 months ago

Have you tried the following:

  1. Re-download model3
  2. Make sure that the TensorFlow version you're using is compatible with the version used to train the model (Tensorflow 2.10.0).
  3. 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?
  4. Use Python version 3.9, which was used in model development. You seem to be using Python 3.7.