Pickle File error on Streamlit Cloud -- Runs perfectly locally -- Need urgent help -- Any help?

When I try to run pickle file in code, I encounter error:
AttributeError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).
Traceback:
File “/home/appuser/venv/lib/python3.7/site-packages/streamlit/scriptrunner/script_runner.py”, line 475, in run_script
exec(code, module.dict)
File “/app/streamlit1/app.py”, line 12, in
show_predict_page()
File “/app/streamlit1/predict_page.py”, line 19, in show_predict_page
st.write(rfc)
File “/home/appuser/venv/lib/python3.7/site-packages/streamlit/elements/write.py”, line 232, in write
string_buffer.append("%s" % str(arg).replace("", "\\"))
File “/home/appuser/venv/lib/python3.7/site-packages/sklearn/base.py”, line 260, in repr
repr
= pp.pformat(self)
File “/usr/local/lib/python3.7/pprint.py”, line 144, in pformat
self._format(object, sio, 0, 0, {}, 0)
File “/usr/local/lib/python3.7/pprint.py”, line 161, in _format
rep = self._repr(object, context, level)
File “/usr/local/lib/python3.7/pprint.py”, line 393, in _repr
self._depth, level)
File “/home/appuser/venv/lib/python3.7/site-packages/sklearn/utils/_pprint.py”, line 181, in format
changed_only=self._changed_only)
File “/home/appuser/venv/lib/python3.7/site-packages/sklearn/utils/_pprint.py”, line 425, in _safe_repr
params = _changed_params(object)
File “/home/appuser/venv/lib/python3.7/site-packages/sklearn/utils/_pprint.py”, line 91, in _changed_params
params = estimator.get_params(deep=False)
File “/home/appuser/venv/lib/python3.7/site-packages/sklearn/base.py”, line 195, in get_params

Hi @riazahmedsg :wave:

The error likely has to do with the version of scikit-learn installed. Replace scikit_learn==0.24.1 with scikit-learn==1.0.2 and the predict method should work without errors!

Happy Streamlit-ing! :balloon:
Snehan

Hi

Thanks for help