Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
rerank model
Browse files
pages/Multimodal_Conversational_Search.py
CHANGED
|
@@ -57,6 +57,8 @@ s3_bucket_ = "pdf-repo-uploads"
|
|
| 57 |
|
| 58 |
if "trigger_search" not in st.session_state:
|
| 59 |
st.session_state.trigger_search = False
|
|
|
|
|
|
|
| 60 |
|
| 61 |
if 'user_id' in st.session_state:
|
| 62 |
user_id = st.session_state['user_id']
|
|
@@ -328,11 +330,11 @@ def render_all():
|
|
| 328 |
|
| 329 |
placeholder = st.empty()
|
| 330 |
with placeholder.container():
|
| 331 |
-
if st.session_state.trigger_search:
|
| 332 |
with st.spinner("Running search..."):
|
| 333 |
handle_input()
|
| 334 |
render_all()
|
| 335 |
-
st.session_state.
|
| 336 |
|
| 337 |
st.markdown("")
|
| 338 |
col_2, col_3 = st.columns([75,20])
|
|
@@ -343,6 +345,11 @@ with col_3:
|
|
| 343 |
play = st.button("Go", key="play")
|
| 344 |
if play:
|
| 345 |
st.session_state.trigger_search = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 346 |
with st.sidebar:
|
| 347 |
st.page_link("app.py", label=":orange[Home]", icon="๐ ")
|
| 348 |
st.subheader(":blue[Sample Data]")
|
|
|
|
| 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 |
|
| 331 |
placeholder = st.empty()
|
| 332 |
with placeholder.container():
|
| 333 |
+
if st.session_state.trigger_search and not st.session_state.run_done:
|
| 334 |
with st.spinner("Running search..."):
|
| 335 |
handle_input()
|
| 336 |
render_all()
|
| 337 |
+
st.session_state.run_done = True
|
| 338 |
|
| 339 |
st.markdown("")
|
| 340 |
col_2, col_3 = st.columns([75,20])
|
|
|
|
| 345 |
play = st.button("Go", key="play")
|
| 346 |
if play:
|
| 347 |
st.session_state.trigger_search = True
|
| 348 |
+
st.session_state.run_done = False
|
| 349 |
+
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
##### Sidebar #####
|
| 353 |
with st.sidebar:
|
| 354 |
st.page_link("app.py", label=":orange[Home]", icon="๐ ")
|
| 355 |
st.subheader(":blue[Sample Data]")
|