Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -90,7 +90,7 @@ def get_response(system_message, chat_history, user_text, max_new_tokens=256):
|
|
90 |
# --- Streamlit UI Setup ---
|
91 |
st.set_page_config(page_title="NASA ChatBot", page_icon="π")
|
92 |
|
93 |
-
st.title("π HAL -
|
94 |
st.markdown("π *Ask me about space, NASA, and beyond!*")
|
95 |
|
96 |
# Ensure chat history is initialized
|
@@ -141,7 +141,7 @@ for message in st.session_state.chat_history:
|
|
141 |
if message["role"] == "user":
|
142 |
st.markdown(f"<div class='user-msg'><strong>You:</strong> {message['content']}</div>", unsafe_allow_html=True)
|
143 |
else:
|
144 |
-
st.markdown(f"<div class='assistant-msg'><strong>
|
145 |
|
146 |
st.markdown("</div>", unsafe_allow_html=True)
|
147 |
|
@@ -157,7 +157,7 @@ if st.button("Send"):
|
|
157 |
)
|
158 |
|
159 |
# Display response
|
160 |
-
st.markdown(f"<div class='assistant-msg'><strong>
|
161 |
|
162 |
# Display NASA image if available
|
163 |
if image_url:
|
@@ -174,4 +174,4 @@ if st.button("Send"):
|
|
174 |
user_text=selected_option,
|
175 |
chat_history=st.session_state.chat_history
|
176 |
)
|
177 |
-
st.markdown(f"<div class='assistant-msg'><strong>
|
|
|
90 |
# --- Streamlit UI Setup ---
|
91 |
st.set_page_config(page_title="NASA ChatBot", page_icon="π")
|
92 |
|
93 |
+
st.title("π HAL - A NASA AI Assistant")
|
94 |
st.markdown("π *Ask me about space, NASA, and beyond!*")
|
95 |
|
96 |
# Ensure chat history is initialized
|
|
|
141 |
if message["role"] == "user":
|
142 |
st.markdown(f"<div class='user-msg'><strong>You:</strong> {message['content']}</div>", unsafe_allow_html=True)
|
143 |
else:
|
144 |
+
st.markdown(f"<div class='assistant-msg'><strong>HAL:</strong> {message['content']}</div>", unsafe_allow_html=True)
|
145 |
|
146 |
st.markdown("</div>", unsafe_allow_html=True)
|
147 |
|
|
|
157 |
)
|
158 |
|
159 |
# Display response
|
160 |
+
st.markdown(f"<div class='assistant-msg'><strong>HAL:</strong> {response}</div>", unsafe_allow_html=True)
|
161 |
|
162 |
# Display NASA image if available
|
163 |
if image_url:
|
|
|
174 |
user_text=selected_option,
|
175 |
chat_history=st.session_state.chat_history
|
176 |
)
|
177 |
+
st.markdown(f"<div class='assistant-msg'><strong>HAL:</strong> {response}</div>", unsafe_allow_html=True)
|