Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
rerank model
Browse files
pages/Multimodal_Conversational_Search.py
CHANGED
|
@@ -55,10 +55,6 @@ s3_bucket_ = "pdf-repo-uploads"
|
|
| 55 |
|
| 56 |
# Check if the user ID is already stored in the session state
|
| 57 |
|
| 58 |
-
if "trigger_search" not in st.session_state:
|
| 59 |
-
st.session_state.trigger_search = False
|
| 60 |
-
if "run_done" not in st.session_state:
|
| 61 |
-
st.session_state.run_done = False
|
| 62 |
|
| 63 |
if 'user_id' in st.session_state:
|
| 64 |
user_id = st.session_state['user_id']
|
|
@@ -330,11 +326,10 @@ def render_all():
|
|
| 330 |
|
| 331 |
placeholder = st.empty()
|
| 332 |
with placeholder.container():
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
st.session_state.trigger_search = False # reset AFTER running
|
| 338 |
|
| 339 |
|
| 340 |
|
|
@@ -343,11 +338,11 @@ 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 |
-
play = st.button("Go", key="play")
|
| 347 |
|
| 348 |
-
# ❗ Do NOT run anything here
|
| 349 |
-
if play:
|
| 350 |
-
|
| 351 |
|
| 352 |
|
| 353 |
|
|
|
|
| 55 |
|
| 56 |
# Check if the user ID is already stored in the session state
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
if 'user_id' in st.session_state:
|
| 60 |
user_id = st.session_state['user_id']
|
|
|
|
| 326 |
|
| 327 |
placeholder = st.empty()
|
| 328 |
with placeholder.container():
|
| 329 |
+
with st.spinner("Running search..."):
|
| 330 |
+
#handle_input()
|
| 331 |
+
render_all()
|
| 332 |
+
#st.session_state.trigger_search = False # reset AFTER running
|
|
|
|
| 333 |
|
| 334 |
|
| 335 |
|
|
|
|
| 338 |
with col_2:
|
| 339 |
st.text_input("Ask here", key="input_query", label_visibility="collapsed")
|
| 340 |
with col_3:
|
| 341 |
+
play = st.button("Go",on_click=handle_input, key="play")
|
| 342 |
|
| 343 |
+
# # ❗ Do NOT run anything here
|
| 344 |
+
# if play:
|
| 345 |
+
# st.session_state.trigger_search = True # mark to run on next rerun
|
| 346 |
|
| 347 |
|
| 348 |
|