Spaces:
Running
on
T4
Running
on
T4
colpali fix
Browse files
pages/Multimodal_Conversational_Search.py
CHANGED
@@ -282,6 +282,9 @@ def render_answer(question,answer,index,res_img):
|
|
282 |
def show_maxsim():
|
283 |
st.session_state.show_columns = True
|
284 |
st.session_state.maxSimImages = colpali.img_highlight(st.session_state.top_img, st.session_state.query_token_vectors, st.session_state.query_tokens)
|
|
|
|
|
|
|
285 |
handle_input()
|
286 |
with placeholder.container():
|
287 |
render_all()
|
@@ -338,8 +341,8 @@ def render_answer(question,answer,index,res_img):
|
|
338 |
st.image(parent_dirname+"/figures/"+st.session_state.input_index+"/"+img+".jpg")
|
339 |
#st.write(caption)
|
340 |
idx = idx+1
|
341 |
-
if(st.session_state.show_columns == True):
|
342 |
-
|
343 |
#st.markdown("<div style='color:#e28743';padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;'><b>Sources from the document:</b></div>", unsafe_allow_html = True)
|
344 |
if(len(answer["table"] )>0):
|
345 |
#with st.expander("Table:"):
|
|
|
282 |
def show_maxsim():
|
283 |
st.session_state.show_columns = True
|
284 |
st.session_state.maxSimImages = colpali.img_highlight(st.session_state.top_img, st.session_state.query_token_vectors, st.session_state.query_tokens)
|
285 |
+
st.session_state.input_query = st.session_state.questions_[-1]["question"]
|
286 |
+
st.session_state.answers_.pop()
|
287 |
+
st.session_state.questions_.pop()
|
288 |
handle_input()
|
289 |
with placeholder.container():
|
290 |
render_all()
|
|
|
341 |
st.image(parent_dirname+"/figures/"+st.session_state.input_index+"/"+img+".jpg")
|
342 |
#st.write(caption)
|
343 |
idx = idx+1
|
344 |
+
# if(st.session_state.show_columns == True):
|
345 |
+
# st.session_state.show_columns = False
|
346 |
#st.markdown("<div style='color:#e28743';padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;'><b>Sources from the document:</b></div>", unsafe_allow_html = True)
|
347 |
if(len(answer["table"] )>0):
|
348 |
#with st.expander("Table:"):
|