CCockrum commited on
Commit
4dfa210
Β·
verified Β·
1 Parent(s): d6afb7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py CHANGED
@@ -165,6 +165,24 @@ def get_response(system_message, user_text, max_new_tokens=800):
165
  # βœ… Streamlit UI
166
  st.title("πŸš€ HAL - NASA AI Assistant")
167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  # βœ… Display Chat History
169
  st.markdown("<div class='container'>", unsafe_allow_html=True)
170
  for message in st.session_state.chat_history:
 
165
  # βœ… Streamlit UI
166
  st.title("πŸš€ HAL - NASA AI Assistant")
167
 
168
+ # βœ… Justify all chatbot responses
169
+ st.markdown("""
170
+ <style>
171
+ .user-msg, .assistant-msg {
172
+ padding: 10px;
173
+ border-radius: 10px;
174
+ margin-bottom: 5px;
175
+ width: fit-content;
176
+ max-width: 80%;
177
+ text-align: justify;
178
+ }
179
+ .user-msg { background-color: #696969; color: white; }
180
+ .assistant-msg { background-color: #333333; color: white; }
181
+ .container { display: flex; flex-direction: column; align-items: flex-start; }
182
+ @media (max-width: 600px) { .user-msg, .assistant-msg { font-size: 16px; max-width: 100%; } }
183
+ </style>
184
+ """, unsafe_allow_html=True)
185
+
186
  # βœ… Display Chat History
187
  st.markdown("<div class='container'>", unsafe_allow_html=True)
188
  for message in st.session_state.chat_history: