ボタンを使用して、streamlit Web アプリに画像を表示したいと考えています。
そのため、ユーザーがボタンをクリックするたびに、ストリームリット Web アプリに画像を表示する必要があります。
以下に示すコード:
feature_choice2 = st.sidebar.multiselect("Plot Size", task2)
if st.button('Find Blueprint'):
if feature_choice2 == '3-marla':
imagee = cv2.imread('Floor_plans/3-marla.png')
cv2.imshow('Image', imagee)
st.image(imagee, caption='3 marla plot')