| 87 | |
| 88 | |
| 89 | def welcome_sidebar(): |
| 90 | logo_col, _ = st.columns([3, 1]) |
| 91 | |
| 92 | with logo_col: |
| 93 | # st.image("images/DevGenius.JPG", width=150) |
| 94 | st.title("✨ DevGenius App") |
| 95 | # Add a horizontal line for visual separation |
| 96 | st.divider() |
| 97 | # Add custom CSS for button styling and text handling |
| 98 | st.markdown(""" |
| 99 | <style> |
| 100 | .stButton button { |
| 101 | background-color: #4CAF50; /* Blue background color */ |
| 102 | color: black; /* Black text for contrast */ |
| 103 | font-size: 18px; /* Set font size */ |
| 104 | padding: 20px 50px; /* Add padding for larger button */ |
| 105 | border-radius: 8px; /* Rounded corners */ |
| 106 | width: auto; /* Let the width adjust based on the text */ |
| 107 | text-align: center; /* Center the text inside the button */ |
| 108 | white-space: nowrap; /* Prevent text from wrapping */ |
| 109 | font-weight: bold; /* Make the text bold */ |
| 110 | display: inline-block; /* Ensure the button is inline-block */ |
| 111 | } |
| 112 | </style> |
| 113 | """, unsafe_allow_html=True) |
| 114 | |
| 115 | if st.button("New Session", use_container_width=True): |
| 116 | st.session_state.user_authenticated = False |
| 117 | st.session_state.messages = [] |
| 118 | st.session_state.mod_messages = [] |
| 119 | st.rerun() |
| 120 | |
| 121 | st.divider() |
| 122 | # Bottom divider and session ID |
| 123 | # st.divider() |
| 124 | # st.write(f"SessionID: {st.session_state.conversation_id}") |
| 125 | # Add the CSS style |
| 126 | st.markdown(""" |
| 127 | <style> |
| 128 | .small-font { |
| 129 | font-size: 12px; |
| 130 | color: #666; |
| 131 | margin: 0; |
| 132 | } |
| 133 | </style> |
| 134 | """, unsafe_allow_html=True) |
| 135 | |
| 136 | # Use the class |
| 137 | st.markdown(f""" |
| 138 | <p class='small-font'> |
| 139 | SessionID: {st.session_state.conversation_id} |
| 140 | </p> |
| 141 | """, unsafe_allow_html=True) |
| 142 | |
| 143 | |
| 144 | def create_tabs(): |