mgbam commited on
Commit
33e75e2
·
verified ·
1 Parent(s): a6f89d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -34
app.py CHANGED
@@ -239,49 +239,29 @@ import streamlit as st
239
 
240
  def main():
241
  st.set_page_config(
242
- page_title="Enhanced Contrast Chatbot",
243
  layout="wide",
244
  initial_sidebar_state="expanded"
245
  )
246
 
247
- # Custom CSS to improve text visibility
248
  st.markdown("""
249
- <style>
250
- /* Force a white background for the main app area */
251
- .stApp {
252
- background-color: #ffffff !important;
253
- }
254
-
255
- /* Make text darker for better contrast */
256
- html, body, [class^="css"] {
257
- color: #111111 !important;
258
- }
259
-
260
- /* Adjust label text (like "Enter your question") */
261
- .stTextArea label {
262
- color: #111111 !important;
263
- }
264
-
265
- /* Make sure sidebar text is also dark */
266
- .css-1v3fvcr {
267
- color: #111111 !important;
268
- }
269
-
270
- /* Example: You can also adjust the background color of
271
- your "data-box" classes if needed */
272
- .data-box {
273
- background-color: #f0f0f0 !important;
274
- color: #111111 !important;
275
- }
276
- </style>
277
  """, unsafe_allow_html=True)
278
 
279
- st.title("Enhanced Contrast Chatbot")
280
- st.markdown("Try typing your question below to see if the text is clearer now:")
281
 
282
- user_query = st.text_area("Enter your question here:")
283
  if st.button("Submit"):
284
- st.write("Your query:", user_query)
285
 
286
  if __name__ == "__main__":
287
  main()
 
239
 
240
  def main():
241
  st.set_page_config(
242
+ page_title="High Contrast Chatbot",
243
  layout="wide",
244
  initial_sidebar_state="expanded"
245
  )
246
 
247
+ # Force all text to be black (#000) and backgrounds to be white (#fff)
248
  st.markdown("""
249
+ <style>
250
+ /* Apply to the entire app */
251
+ html, body, [class*="css"] {
252
+ color: #000000 !important; /* Black text */
253
+ background-color: #ffffff !important; /* White background */
254
+ text-shadow: none !important; /* Remove any faint shadows */
255
+ }
256
+ </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  """, unsafe_allow_html=True)
258
 
259
+ st.title("High Contrast Chatbot")
260
+ st.markdown("Enter your question below. All text should now be clearly visible.")
261
 
262
+ user_query = st.text_area("Ask me something:")
263
  if st.button("Submit"):
264
+ st.write("You asked:", user_query)
265
 
266
  if __name__ == "__main__":
267
  main()