Issue with importing .pb (and potentially .h5) files

Hello,
I made a simple model using tensorflow and keras, and saved it in /saved_models/2.
the structure seems fine, but I cannot find a way to import it in streamlit.
I’ve tried:

  • importing the .pb file: says it isnt supported. ( used keras.models.load_model(“/saved_models/2”))
  • saving as .h5: this one I’m not confident about. Still throws an error.
  • saving as .keras and importing accordingly: the method is correct, but I get a very long error talking about deserialization. I am new to this stuff so I didn’t completely understand.

P.S. It works perfectly fine when running on localhost.

Github repo for reference:
Github Repository