Spaces:
Running
on
T4
Running
on
T4
rerank model
Browse files
pages/Multimodal_Conversational_Search.py
CHANGED
@@ -328,25 +328,26 @@ def render_all():
|
|
328 |
write_user_message(q)
|
329 |
write_chat_message(a, q,index)
|
330 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
placeholder = st.empty()
|
332 |
with placeholder.container():
|
333 |
if st.session_state.trigger_search:
|
334 |
with st.spinner("Running search..."):
|
335 |
handle_input()
|
336 |
-
|
337 |
-
st.session_state.trigger_search = False
|
338 |
|
339 |
-
|
340 |
-
st.markdown("")
|
341 |
-
with st.form("query_form"):
|
342 |
-
col_2, col_3 = st.columns([75, 20])
|
343 |
-
with col_2:
|
344 |
-
st.text_input("Ask here", key="input_query", label_visibility="collapsed")
|
345 |
-
with col_3:
|
346 |
-
submitted = st.form_submit_button("Go")
|
347 |
-
|
348 |
-
if submitted:
|
349 |
-
st.session_state.trigger_search = True
|
350 |
|
351 |
|
352 |
|
|
|
328 |
write_user_message(q)
|
329 |
write_chat_message(a, q,index)
|
330 |
|
331 |
+
|
332 |
+
st.markdown("")
|
333 |
+
col_2, col_3 = st.columns([75, 20])
|
334 |
+
with col_2:
|
335 |
+
st.text_input("Ask here", key="input_query", label_visibility="collapsed")
|
336 |
+
with col_3:
|
337 |
+
play = st.button("Go", key="play")
|
338 |
+
|
339 |
+
# ❗ Do NOT run anything here
|
340 |
+
if play:
|
341 |
+
st.session_state.trigger_search = True # mark to run on next rerun
|
342 |
+
|
343 |
placeholder = st.empty()
|
344 |
with placeholder.container():
|
345 |
if st.session_state.trigger_search:
|
346 |
with st.spinner("Running search..."):
|
347 |
handle_input()
|
348 |
+
render_all()
|
349 |
+
st.session_state.trigger_search = False # reset AFTER running
|
350 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
|
352 |
|
353 |
|