Hi , I have a few videos to display based on a radio button selection inside beta_expander. Everything works great until I close the expander in which case the video is still visible right underneath the expander name. Can anyone show me how to “shrink” all actions related to the radio when the expander is closed? Thank you.
Edit: The only way I can have the video not be visible after the expander is closed is if I click on the “None” radio button first, then close the expander, which is not the feature I would like.
show_video = st.beta_expander(“Show Video”, False)
choice = show_tutorial.radio(“Select one tutorial”, [“None”, “Video1”, “Video2”])
if choice == “None”:
if choice == “Video1”:’
video_file = open(my_file1, “rb”).read()
if choice == “Video2”:
video_file = open(my_file2, “rb”).read()