euracle commited on
Commit
e59c0f4
·
verified ·
1 Parent(s): 5236a61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -4
app.py CHANGED
@@ -17,8 +17,7 @@ from langchain.text_splitter import RecursiveCharacterTextSplitter
17
  st.set_page_config(
18
  page_title="Dr. Radha: The Agro-Homeopath",
19
  page_icon="🌿",
20
- layout="wide",
21
- initial_sidebar_state="collapsed"
22
  )
23
 
24
  # Enhanced CSS styling
@@ -81,6 +80,28 @@ st.markdown("""
81
  </style>
82
  """, unsafe_allow_html=True)
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  # Initialize session state for chat history
85
  if "messages" not in st.session_state:
86
  st.session_state.messages = []
@@ -316,7 +337,7 @@ chat_container = st.container()
316
  with chat_container:
317
  # Display chat history
318
  for message in st.session_state.messages:
319
- with st.chat_message(message["role"], avatar="👤" if message["role"] == "user" else "🌿"):
320
  st.markdown(message["content"])
321
 
322
  with st.form(key='query_form', clear_on_submit=True):
@@ -325,7 +346,7 @@ with st.form(key='query_form', clear_on_submit=True):
325
  placeholder="Describe your plant issue here...",
326
  label_visibility="collapsed"
327
  )
328
- submit_button = st.form_submit_button(label='Send Message 📤')
329
 
330
  human_image = "human.png"
331
  robot_image = "bot.jpg"
 
17
  st.set_page_config(
18
  page_title="Dr. Radha: The Agro-Homeopath",
19
  page_icon="🌿",
20
+ layout="wide"
 
21
  )
22
 
23
  # Enhanced CSS styling
 
80
  </style>
81
  """, unsafe_allow_html=True)
82
 
83
+ st.markdown("""
84
+ <style>
85
+ .css-1d391kg { /* Sidebar style */
86
+ background-color: #163832;
87
+ padding: 1rem;
88
+ }
89
+
90
+ .css-1d391kg .stTextArea {
91
+ background-color: rgba(255, 255, 255, 0.05);
92
+ border-radius: 10px;
93
+ margin-bottom: 10px;
94
+ }
95
+
96
+ /* Sidebar text color */
97
+ .css-1d391kg .stMarkdown,
98
+ .css-1d391kg .stText,
99
+ .css-1d391kg .stTitle {
100
+ color: white !important;
101
+ }
102
+ </style>
103
+ """, unsafe_allow_html=True)
104
+
105
  # Initialize session state for chat history
106
  if "messages" not in st.session_state:
107
  st.session_state.messages = []
 
337
  with chat_container:
338
  # Display chat history
339
  for message in st.session_state.messages:
340
+ with st.chat_message(message["role"], avatar="👤" if message["role"] == "user" else robot_image):
341
  st.markdown(message["content"])
342
 
343
  with st.form(key='query_form', clear_on_submit=True):
 
346
  placeholder="Describe your plant issue here...",
347
  label_visibility="collapsed"
348
  )
349
+ submit_button = st.form_submit_button(label='Submit 📤')
350
 
351
  human_image = "human.png"
352
  robot_image = "bot.jpg"