runtime error

e> from tf_keras.src.saving import saving_api File "/usr/local/lib/python3.10/site-packages/tf_keras/src/saving/saving_api.py", line 25, in <module> from tf_keras.src.saving.legacy import save as legacy_sm_saving_lib File "/usr/local/lib/python3.10/site-packages/tf_keras/src/saving/legacy/save.py", line 27, in <module> from tf_keras.src.saving.legacy.saved_model import load_context File "/usr/local/lib/python3.10/site-packages/tf_keras/src/saving/legacy/saved_model/load_context.py", line 68, in <module> tf.__internal__.register_load_context_function(in_load_context) AttributeError: module 'tensorflow._api.v2.compat.v2.__internal__' has no attribute 'register_load_context_function'. Did you mean: 'register_call_context_function'? The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/user/app/app.py", line 4, in <module> pipeline = pipeline(task="text-classification", model="Preetham04/sentiment-analysis_tf") File "/usr/local/lib/python3.10/site-packages/transformers/pipelines/__init__.py", line 906, in pipeline framework, model = infer_framework_load_model( File "/usr/local/lib/python3.10/site-packages/transformers/pipelines/base.py", line 258, in infer_framework_load_model _class = getattr(transformers_module, f"TF{architecture}", None) File "/usr/local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1501, in __getattr__ value = getattr(module, name) File "/usr/local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1500, in __getattr__ module = self._get_module(self._class_to_module[name]) File "/usr/local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1512, in _get_module raise RuntimeError( RuntimeError: Failed to import transformers.models.bert.modeling_tf_bert because of the following error (look up to see its traceback): module 'tensorflow._api.v2.compat.v2.__internal__' has no attribute 'register_load_context_function'

Container logs:

Fetching error logs...