Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamlit api seems broken #1

Open
st-karlos opened this issue Oct 31, 2023 · 0 comments
Open

Streamlit api seems broken #1

st-karlos opened this issue Oct 31, 2023 · 0 comments

Comments

@st-karlos
Copy link

Dear authors,

Congratulations to your publication.

I am trying to run your repo; after fixing a urlib3 issue, downgrading to 1.26.18 rather than 2.0.5, I get the next error:

RuntimeError: Failed to import transformers.models.distilbert.modeling_tf_distilbert because of the following error (look up to see its traceback): No module named 'keras.engine'

Traceback: File "/Users/user/anaconda3/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script exec(code, module.__dict__) File "/Users/user/Documents/Git/CAVE-demo/app.py", line 511, in <module> main() File "/Users/user/Documents/Git/CAVE-demo/app.py", line 508, in main correct_products(config) File "/Users/user/Documents/Git/CAVE-demo/app.py", line 350, in correct_products model, model_ckpt = choose_model(config) ^^^^^^^^^^^^^^^^^^^^ File "/Users/user/Documents/Git/CAVE-demo/app.py", line 134, in choose_model return load_model(model_ckpt), model_ckpt ^^^^^^^^^^^^^^^^^^^^^^ File "/Users/user/anaconda3/lib/python3.11/site-packages/streamlit/runtime/legacy_caching/caching.py", line 716, in wrapped_func return get_or_create_cached_value() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/user/anaconda3/lib/python3.11/site-packages/streamlit/runtime/legacy_caching/caching.py", line 697, in get_or_create_cached_value return_value = non_optional_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/user/Documents/Git/CAVE-demo/app.py", line 47, in load_model return AttributeExtractor(model_ckpt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/user/Documents/Git/CAVE-demo/attribute_extractor.py", line 14, in __init__ self.model = TFAutoModelForQuestionAnswering.from_pretrained(self.model_ckpt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/user/anaconda3/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 466, in from_pretrained model_class = _get_model_class(config, cls._model_mapping) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/user/anaconda3/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 360, in _get_model_class supported_models = model_mapping[type(config)] ~~~~~~~~~~~~~^^^^^^^^^^^^^^ File "/Users/user/anaconda3/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 598, in __getitem__ return self._load_attr_from_module(model_type, model_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/user/anaconda3/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 612, in _load_attr_from_module return getattribute_from_module(self._modules[module_name], attr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/user/anaconda3/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 557, in getattribute_from_module if hasattr(module, attr): ^^^^^^^^^^^^^^^^^^^^^ File "/Users/user/anaconda3/lib/python3.11/site-packages/transformers/utils/import_utils.py", line 1162, in __getattr__ module = self._get_module(self._class_to_module[name]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/user/anaconda3/lib/python3.11/site-packages/transformers/utils/import_utils.py", line 1174, in _get_module raise RuntimeError(

Any suggestions?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant