IAMTFRMZA commited on
Commit
7d3fd8a
·
verified ·
1 Parent(s): e6c3180

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -12
app.py CHANGED
@@ -65,10 +65,23 @@ st.markdown("""
65
  .stChatMessage { max-width: 85%; border-radius: 12px; padding: 8px; margin-bottom: 10px; }
66
  .stChatMessage[data-testid="stChatMessage-user"] { background: #f0f0f0; color: #000000; }
67
  .stChatMessage[data-testid="stChatMessage-assistant"] { background: #e3f2fd; color: #000000; }
 
 
 
 
 
 
 
68
  .chat-history-wrapper {
69
- display: flex; flex-direction: column; justify-content: flex-end;
70
- height: 65vh; overflow-y: auto;
71
- margin-bottom: 6em; padding: 0 0.5em;
 
 
 
 
 
 
72
  }
73
  .chat-input-bar {
74
  position: fixed; bottom: 0; width: 100%; z-index: 100;
@@ -175,18 +188,14 @@ def synthesize_voice(text, voice_key, user_id):
175
  st.session_state["last_voice"] = voice
176
  return out_path
177
 
178
- # --- Show chat history ---
 
179
  display_chat_history()
180
 
181
- # --- LORAIN is thinking indicator ---
182
  if st.session_state.get("is_thinking", False):
183
- st.markdown("""
184
- <div style="
185
- text-align:center; color:#ddd; font-size: 14px;
186
- margin-top: 0.5em; margin-bottom: 0.5em;">
187
- 🤖 <em>LORAIN is thinking...</em>
188
- </div>
189
- """, unsafe_allow_html=True)
190
 
191
  # --- Input bar (floating at bottom) ---
192
  st.markdown('<div class="chat-input-bar">', unsafe_allow_html=True)
 
65
  .stChatMessage { max-width: 85%; border-radius: 12px; padding: 8px; margin-bottom: 10px; }
66
  .stChatMessage[data-testid="stChatMessage-user"] { background: #f0f0f0; color: #000000; }
67
  .stChatMessage[data-testid="stChatMessage-assistant"] { background: #e3f2fd; color: #000000; }
68
+ .chat-body {
69
+ display: flex;
70
+ flex-direction: column;
71
+ justify-content: flex-end;
72
+ height: 75vh;
73
+ margin-bottom: 6em;
74
+ }
75
  .chat-history-wrapper {
76
+ flex-grow: 1;
77
+ overflow-y: auto;
78
+ padding: 0 0.5em;
79
+ }
80
+ .lorain-thinking {
81
+ text-align: center;
82
+ color: #ddd;
83
+ font-size: 14px;
84
+ margin: 0.5em 0;
85
  }
86
  .chat-input-bar {
87
  position: fixed; bottom: 0; width: 100%; z-index: 100;
 
188
  st.session_state["last_voice"] = voice
189
  return out_path
190
 
191
+ # --- Chat BODY ---
192
+ st.markdown('<div class="chat-body">', unsafe_allow_html=True)
193
  display_chat_history()
194
 
 
195
  if st.session_state.get("is_thinking", False):
196
+ st.markdown('<div class="lorain-thinking">🤖 <em>LORAIN is thinking...</em></div>', unsafe_allow_html=True)
197
+
198
+ st.markdown('</div>', unsafe_allow_html=True)
 
 
 
 
199
 
200
  # --- Input bar (floating at bottom) ---
201
  st.markdown('<div class="chat-input-bar">', unsafe_allow_html=True)