Spaces:
Sleeping
Sleeping
import streamlit as st | |
def main(): | |
st.set_page_config( | |
page_title="Enhanced Contrast Chatbot", | |
layout="wide", | |
initial_sidebar_state="expanded" | |
) | |
# Custom CSS to improve text visibility | |
st.markdown(""" | |
<style> | |
/* Force a white background for the main app area */ | |
.stApp { | |
background-color: #ffffff !important; | |
} | |
/* Make text darker for better contrast */ | |
html, body, [class^="css"] { | |
color: #111111 !important; | |
} | |
/* Adjust label text (like "Enter your question") */ | |
.stTextArea label { | |
color: #111111 !important; | |
} | |
/* Make sure sidebar text is also dark */ | |
.css-1v3fvcr { | |
color: #111111 !important; | |
} | |
/* Example: You can also adjust the background color of | |
your "data-box" classes if needed */ | |
.data-box { | |
background-color: #f0f0f0 !important; | |
color: #111111 !important; | |
} | |
</style> | |
""", unsafe_allow_html=True) | |
st.title("Enhanced Contrast Chatbot") | |
st.markdown("Try typing your question below to see if the text is clearer now:") | |
user_query = st.text_area("Enter your question here:") | |
if st.button("Submit"): | |
st.write("Your query:", user_query) | |
if __name__ == "__main__": | |
main() | |