Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -68,7 +68,7 @@ if not st.session_state.initialized:
|
|
68 |
st.session_state.init_time = time.time()
|
69 |
init_message.success("System initialized successfully!")
|
70 |
time.sleep(0.1)
|
71 |
-
st.
|
72 |
except Exception as e:
|
73 |
init_message.error(f"Error initializing: {str(e)}")
|
74 |
|
@@ -84,6 +84,7 @@ def handle_form_submit():
|
|
84 |
st.session_state.last_query = st.session_state.query_input
|
85 |
st.session_state.submit_clicked = True
|
86 |
st.session_state.query_input = ""
|
|
|
87 |
|
88 |
# Create a form for handling the user input
|
89 |
with st.form(key="query_form"):
|
|
|
68 |
st.session_state.init_time = time.time()
|
69 |
init_message.success("System initialized successfully!")
|
70 |
time.sleep(0.1)
|
71 |
+
st.rerun() # Ensure the UI updates correctly
|
72 |
except Exception as e:
|
73 |
init_message.error(f"Error initializing: {str(e)}")
|
74 |
|
|
|
84 |
st.session_state.last_query = st.session_state.query_input
|
85 |
st.session_state.submit_clicked = True
|
86 |
st.session_state.query_input = ""
|
87 |
+
st.rerun() # Forces UI to refresh, ensuring input box turns green
|
88 |
|
89 |
# Create a form for handling the user input
|
90 |
with st.form(key="query_form"):
|