runtime error
in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/usr/local/lib/python3.10/site-packages/transformers/models/gpt2/modeling_tf_gpt2.py", line 26, in <module> from ...activations_tf import get_tf_activation File "/usr/local/lib/python3.10/site-packages/transformers/activations_tf.py", line 27, in <module> raise ValueError( ValueError: Your currently installed version of Keras is Keras 3, but this is not yet supported in Transformers. Please install the backwards-compatible tf-keras package with `pip install tf-keras`. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/user/app/app.py", line 7, in <module> gpt2_5x4 = pipeline('text-generation', model = "Lifan-Z/Chinese-Classic-Poem-Generator-style5x4-GPT2") File "/usr/local/lib/python3.10/site-packages/transformers/pipelines/__init__.py", line 905, in pipeline framework, model = infer_framework_load_model( File "/usr/local/lib/python3.10/site-packages/transformers/pipelines/base.py", line 254, 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 1463, in __getattr__ value = getattr(module, name) File "/usr/local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1462, 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 1474, in _get_module raise RuntimeError( RuntimeError: Failed to import transformers.models.gpt2.modeling_tf_gpt2 because of the following error (look up to see its traceback): Your currently installed version of Keras is Keras 3, but this is not yet supported in Transformers. Please install the backwards-compatible tf-keras package with `pip install tf-keras`.
Container logs:
Fetching error logs...