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
541 stars 83 forks source link

Image does not show up when using the canvas with st_pages #119

Open janezlapajne opened 1 year ago

janezlapajne commented 1 year ago

Hello,

when I run the provided app everything works fine. When I try basic example and upload an image it shows up. However, when I call the same script by using st_pages only black background is displayed on the location where the image should be shown.

To recreate the issue, I have an app.py and app_draw.py script. The first creates pages and the second calls the provided canvas example. As stated, this example does work in the sense that the canvas example application runs, but only black background is displayed on the location, where instead the image should be shown. Is there any workaround for it?

# this is app.py script

import streamlit as st
from st_pages import Page, Section, show_pages, add_page_title

show_pages(
    [
        Page("app.py", "Home", "🏠"),
        Page("app_draw.py", "Draw", "✨"),
    ]
)