Spaces:
Running
on
T4
Running
on
T4
Clean up: removed ignored folders from tracking
Browse files
pages/Multimodal_Conversational_Search.py
CHANGED
@@ -28,9 +28,6 @@ import warnings
|
|
28 |
|
29 |
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
st.set_page_config(
|
35 |
#page_title="Semantic Search using OpenSearch",
|
36 |
layout="wide",
|
@@ -117,32 +114,10 @@ st.markdown("""
|
|
117 |
</style>
|
118 |
""",unsafe_allow_html=True)
|
119 |
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
credentials = boto3.Session().get_credentials()
|
124 |
awsauth = HTTPBasicAuth('master',st.secrets['ml_search_demo_api_access'])
|
125 |
service = 'es'
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
# if "input_searchType" not in st.session_state:
|
131 |
-
# st.session_state.input_searchType = "Conversational Search (RAG)"
|
132 |
-
|
133 |
-
# if "input_temperature" not in st.session_state:
|
134 |
-
# st.session_state.input_temperature = "0.001"
|
135 |
-
|
136 |
-
# if "input_topK" not in st.session_state:
|
137 |
-
# st.session_state.input_topK = 200
|
138 |
-
|
139 |
-
# if "input_topP" not in st.session_state:
|
140 |
-
# st.session_state.input_topP = 0.95
|
141 |
-
|
142 |
-
# if "input_maxTokens" not in st.session_state:
|
143 |
-
# st.session_state.input_maxTokens = 1024
|
144 |
-
|
145 |
-
|
146 |
def write_logo():
|
147 |
col1, col2, col3 = st.columns([5, 1, 5])
|
148 |
with col2:
|
@@ -542,7 +517,6 @@ with st.sidebar:
|
|
542 |
|
543 |
st.subheader(":blue[Multi-vector retrieval]")
|
544 |
|
545 |
-
#st.write("Dataset indexed: https://huggingface.co/datasets/vespa-engine/gpfg-QA")
|
546 |
colpali_search_rerank = st.checkbox('Try Colpali multi-vector retrieval on the [sample dataset](https://huggingface.co/datasets/vespa-engine/gpfg-QA)', key = 'input_colpali', disabled = False, value = False, help = "Checking this box will use colpali as the embedding model and retrieval is performed using multi-vectors followed by re-ranking using MaxSim")
|
547 |
|
548 |
if(colpali_search_rerank):
|
@@ -553,14 +527,6 @@ with st.sidebar:
|
|
553 |
|
554 |
with st.expander("Sample questions for Colpali retriever:"):
|
555 |
st.write("1. Proportion of female new hires 2021-2023? \n\n 2. First-half 2021 return on unlisted real estate investments? \n\n 3. Trend of the fund's expected absolute volatility between January 2014 and January 2016? \n\n 4. Fund return percentage in 2017? \n\n 5. Annualized gross return of the fund from 1997 to 2008?")
|
556 |
-
|
557 |
-
|
558 |
-
# copali_rerank = st.checkbox("Search and Re-rank with Token level vectors",key = 'copali_rerank',help = "Enabling this option uses 'Copali' model's page level image embeddings to retrieve documents and MaxSim to re-rank the pages.\n\n Hugging Face Model: https://huggingface.co/vidore/colpali")
|
559 |
-
|
560 |
-
# if(copali_rerank):
|
561 |
-
# st.session_state.input_copali_rerank = True
|
562 |
-
# else:
|
563 |
-
# st.session_state.input_copali_rerank = False
|
564 |
-
|
565 |
|
566 |
|
|
|
28 |
|
29 |
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
30 |
|
|
|
|
|
|
|
31 |
st.set_page_config(
|
32 |
#page_title="Semantic Search using OpenSearch",
|
33 |
layout="wide",
|
|
|
114 |
</style>
|
115 |
""",unsafe_allow_html=True)
|
116 |
|
|
|
|
|
|
|
117 |
credentials = boto3.Session().get_credentials()
|
118 |
awsauth = HTTPBasicAuth('master',st.secrets['ml_search_demo_api_access'])
|
119 |
service = 'es'
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
def write_logo():
|
122 |
col1, col2, col3 = st.columns([5, 1, 5])
|
123 |
with col2:
|
|
|
517 |
|
518 |
st.subheader(":blue[Multi-vector retrieval]")
|
519 |
|
|
|
520 |
colpali_search_rerank = st.checkbox('Try Colpali multi-vector retrieval on the [sample dataset](https://huggingface.co/datasets/vespa-engine/gpfg-QA)', key = 'input_colpali', disabled = False, value = False, help = "Checking this box will use colpali as the embedding model and retrieval is performed using multi-vectors followed by re-ranking using MaxSim")
|
521 |
|
522 |
if(colpali_search_rerank):
|
|
|
527 |
|
528 |
with st.expander("Sample questions for Colpali retriever:"):
|
529 |
st.write("1. Proportion of female new hires 2021-2023? \n\n 2. First-half 2021 return on unlisted real estate investments? \n\n 3. Trend of the fund's expected absolute volatility between January 2014 and January 2016? \n\n 4. Fund return percentage in 2017? \n\n 5. Annualized gross return of the fund from 1997 to 2008?")
|
530 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
|
532 |
|