Good day!
I am trying to translate this Detecto sample code on a Colab notebook as a Streamlit app, as practice for a future re-implementation for my project’s purposes. I was successfully able to run the translated app locally on my workstation. But as I was testing the very same code on Streamlit Cloud via a Github repo, I am getting the error:
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
As I understand from searching for info about this error, it stems from the use of opencv-python as a dependency, so I followed the advice on Streamlit’s knowledge base and included opencv-python-headless in my requirements.txt file. As I rebooted the app, it returned the very same error, which I suspect is because Detecto lists opencv-python as its dependency.
How can I work around this issue then? Any form of insight will be appreciated
EDIT: Here is the screenshot of the error as seen in the Streamlit Cloud version:
And here is how it looks like in my local setup:
Of which the end output is going to be labeled dogs, as intended by Detecto’s developers, but in a pretty layout that Streamlit is known for: