andfanilo / streamlit-drawable-canvas

Do you like Quick, Draw? Well what if you could train/predict doodles drawn inside Streamlit? Also draws lines, circles and boxes over background images for annotation.
https://drawable-canvas.streamlit.app/
MIT License
544 stars 83 forks source link

Images as URL in 0.9.0 don't work in Streamlit Cloud #70

Open andfanilo opened 2 years ago

andfanilo commented 2 years ago

Any people stumbling on this deploying to Streamlit Cloud, please downgrade to 0.8.0 in the meantime

Probably some odd referring stuff?

image

should expect:

image

kapong commented 2 years ago

I think it's because default URL in code is start with /media/...., when it read by browser, it will get wrong URL.

Any scripts in Streamlit cloud are in subpath of domain but in hosted are not.

I believe if we can change /media/... to media/... it's will be solved this problem.

this line of code you have to investigate streamlit_drawable_canvas/frontend/src/DrawableCanvas.tsx#L116

chraibi commented 2 years ago

@andfanilo thanks for looking into it. Just a question, though: In my issue, I'm not using any URLs. My image is basically a variable created within the script with no possible path-issues attached.