Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,8 @@ if NASA_API_KEY is None:
|
|
21 |
# β
Set Up Streamlit
|
22 |
st.set_page_config(page_title="HAL - NASA ChatBot", page_icon="π")
|
23 |
|
|
|
|
|
24 |
# β
Ensure Session State Variables
|
25 |
if "chat_history" not in st.session_state:
|
26 |
st.session_state.chat_history = [{"role": "assistant", "content": "Hello! How can I assist you today?"}]
|
@@ -207,11 +209,6 @@ if st.sidebar.button("Reset Chat"):
|
|
207 |
st.session_state.response_ready = False
|
208 |
st.session_state.follow_up = ""
|
209 |
|
210 |
-
user_input = st.chat_input("Type your message here...") # Make sure this is executed first
|
211 |
-
|
212 |
-
|
213 |
-
# β
Chat UI
|
214 |
-
user_input = st.chat_input("Type your message here...")
|
215 |
|
216 |
if user_input:
|
217 |
# β
Ensure get_response() returns a response
|
|
|
21 |
# β
Set Up Streamlit
|
22 |
st.set_page_config(page_title="HAL - NASA ChatBot", page_icon="π")
|
23 |
|
24 |
+
user_input = st.chat_input("Type your message here...") # Make sure this is executed first
|
25 |
+
|
26 |
# β
Ensure Session State Variables
|
27 |
if "chat_history" not in st.session_state:
|
28 |
st.session_state.chat_history = [{"role": "assistant", "content": "Hello! How can I assist you today?"}]
|
|
|
209 |
st.session_state.response_ready = False
|
210 |
st.session_state.follow_up = ""
|
211 |
|
|
|
|
|
|
|
|
|
|
|
212 |
|
213 |
if user_input:
|
214 |
# β
Ensure get_response() returns a response
|