Spaces:
Running
on
T4
Running
on
T4
colpali fix
Browse files
pages/Multimodal_Conversational_Search.py
CHANGED
@@ -279,26 +279,7 @@ def render_answer(question,answer,index,res_img):
|
|
279 |
with col2:
|
280 |
ans_ = answer['answer']
|
281 |
st.write(ans_)
|
282 |
-
|
283 |
-
for _ in range(10)])
|
284 |
-
# def show_maxsim():
|
285 |
-
# st.session_state.show_columns = True
|
286 |
-
# # st.session_state.input_query = st.session_state.questions_[-1]["question"]
|
287 |
-
# # st.session_state.answers_.pop()
|
288 |
-
# # st.session_state.questions_.pop()
|
289 |
-
# handle_input()
|
290 |
-
# print("*"*20)
|
291 |
-
# print(st.session_state.input_query)
|
292 |
-
# print(st.session_state.answers_)
|
293 |
-
# print(st.session_state.questions_)
|
294 |
-
# print("*"*20)
|
295 |
-
# with placeholder.container():
|
296 |
-
# render_all()
|
297 |
-
|
298 |
-
if(st.session_state.input_is_colpali):
|
299 |
-
placeholder__ = st.empty()
|
300 |
-
placeholder__.button("Show similarity map",key=rdn_key_1,on_click=handle_input,args=('colpali_show_similarity_map',None))
|
301 |
-
|
302 |
|
303 |
colu1,colu2,colu3 = st.columns([4,82,20])
|
304 |
with colu2:
|
@@ -357,8 +338,8 @@ def render_answer(question,answer,index,res_img):
|
|
357 |
|
358 |
rdn_key = ''.join([random.choice(string.ascii_letters)
|
359 |
for _ in range(10)])
|
360 |
-
|
361 |
-
|
362 |
currentValue = ''.join(st.session_state.input_rag_searchType)+str(st.session_state.input_is_rerank)+str(st.session_state.input_table_with_sql)+st.session_state.input_index
|
363 |
oldValue = ''.join(st.session_state.inputs_["rag_searchType"])+str(st.session_state.inputs_["is_rerank"])+str(st.session_state.inputs_["table_with_sql"])+str(st.session_state.inputs_["index"])
|
364 |
#print("changing values-----------------")
|
@@ -390,6 +371,24 @@ def render_answer(question,answer,index,res_img):
|
|
390 |
|
391 |
placeholder__ = st.empty()
|
392 |
placeholder__.button("🔄",key=rdn_key,on_click=on_button_click)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
#placeholder__.button("Show similarity map",key=rdn_key_1,on_click = show_maxsim)
|
394 |
|
395 |
|
|
|
279 |
with col2:
|
280 |
ans_ = answer['answer']
|
281 |
st.write(ans_)
|
282 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
|
284 |
colu1,colu2,colu3 = st.columns([4,82,20])
|
285 |
with colu2:
|
|
|
338 |
|
339 |
rdn_key = ''.join([random.choice(string.ascii_letters)
|
340 |
for _ in range(10)])
|
341 |
+
rdn_key_1 = ''.join([random.choice(string.ascii_letters)
|
342 |
+
for _ in range(10)])
|
343 |
currentValue = ''.join(st.session_state.input_rag_searchType)+str(st.session_state.input_is_rerank)+str(st.session_state.input_table_with_sql)+st.session_state.input_index
|
344 |
oldValue = ''.join(st.session_state.inputs_["rag_searchType"])+str(st.session_state.inputs_["is_rerank"])+str(st.session_state.inputs_["table_with_sql"])+str(st.session_state.inputs_["index"])
|
345 |
#print("changing values-----------------")
|
|
|
371 |
|
372 |
placeholder__ = st.empty()
|
373 |
placeholder__.button("🔄",key=rdn_key,on_click=on_button_click)
|
374 |
+
|
375 |
+
# def show_maxsim():
|
376 |
+
# st.session_state.show_columns = True
|
377 |
+
# # st.session_state.input_query = st.session_state.questions_[-1]["question"]
|
378 |
+
# # st.session_state.answers_.pop()
|
379 |
+
# # st.session_state.questions_.pop()
|
380 |
+
# handle_input()
|
381 |
+
# print("*"*20)
|
382 |
+
# print(st.session_state.input_query)
|
383 |
+
# print(st.session_state.answers_)
|
384 |
+
# print(st.session_state.questions_)
|
385 |
+
# print("*"*20)
|
386 |
+
# with placeholder.container():
|
387 |
+
# render_all()
|
388 |
+
|
389 |
+
if(st.session_state.input_is_colpali):
|
390 |
+
placeholder__.button("Show similarity map",key=rdn_key_1,on_click=handle_input,args=('colpali_show_similarity_map',None))
|
391 |
+
|
392 |
#placeholder__.button("Show similarity map",key=rdn_key_1,on_click = show_maxsim)
|
393 |
|
394 |
|