ImportError with Streamlit Sharing

Hi, everyone!
I’m a machine learning beginner, studying with Python.
Recently I got a problem with Streamlit Sharing to share my streamlit website of my ‘tiny’ team project.
This site works well on local, but couldn’t share even if I wrote an requirement.txt file on my github repository.

Here’s my github repository to share website.

And the error messages.
ImportError: 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.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 556, in _run_script
    exec(code, module.__dict__)File "/app/project_005_streamlit/Project_005_in_all.py", line 13, in <module>
    import mediapipe as mpFile "/home/appuser/venv/lib/python3.9/site-packages/mediapipe/__init__.py", line 17, in <module>
    import mediapipe.python.solutions as solutionsFile "/home/appuser/venv/lib/python3.9/site-packages/mediapipe/python/solutions/__init__.py", line 17, in <module>
    import mediapipe.python.solutions.drawing_stylesFile "/home/appuser/venv/lib/python3.9/site-packages/mediapipe/python/solutions/drawing_styles.py", line 20, in <module>
    from mediapipe.python.solutions.drawing_utils import DrawingSpecFile "/home/appuser/venv/lib/python3.9/site-packages/mediapipe/python/solutions/drawing_utils.py", line 20, in <module>
    import cv2

Can you guys help me with great mercy?

Hi @yangchangnaihoby, welcome to the Streamlit Community! :wave: :partying_face:

Take a look at the following doc and let us know if it helps:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.