File size: 1,003 Bytes
53bbad7
901c25b
a3803c0
 
 
 
 
 
 
 
 
53bbad7
a3803c0
 
 
 
 
 
 
 
 
0eb4850
a3803c0
 
0eb4850
a3803c0
 
 
 
 
c661d50
a3803c0
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import streamlit as st
password = os.environ.get("passsord")
# Define a function to hide a Streamlit tab
def hide_tab():
    hide_streamlit_style = """
            <style>
            #MainMenu {visibility: hidden;}
            footer {visibility: hidden;}
            </style>
            """
    st.markdown(hide_streamlit_style, unsafe_allow_html=True)

# Define a function to show a Streamlit tab
def show_tab():
    show_streamlit_style = """
            <style>
            #MainMenu {visibility: visible;}
            footer {visibility: visible;}
            </style>
            """
    st.markdown(show_streamlit_style, unsafe_allow_html=True)

# Hide the Streamlit tab by default
hide_tab()

# Create a button to show the hidden tab
if st.button('Show tab'):
    show_tab()
    # Add content to the tab
    st.write('This is a hidden tab. You can now see it!')
    st.write(f"Password: {password}")
    # Create a button to hide the tab again
    if st.button('Hide tab'):
        hide_tab()