Update app.py
Browse files
app.py
CHANGED
@@ -164,7 +164,7 @@ bi_enc_options = ["multi-qa-mpnet-base-dot-v1","all-mpnet-base-v2","multi-qa-Min
|
|
164 |
|
165 |
# This function will search all wikipedia articles for passages that
|
166 |
# answer the query
|
167 |
-
def
|
168 |
st.write(f"Search Query: {query}")
|
169 |
|
170 |
st.write("Document Header: ")
|
@@ -298,5 +298,5 @@ if search:
|
|
298 |
with st.spinner(
|
299 |
text="Embedding completed, searching for relevant text for given query and hits..."):
|
300 |
|
301 |
-
|
302 |
|
|
|
164 |
|
165 |
# This function will search all wikipedia articles for passages that
|
166 |
# answer the query
|
167 |
+
def search_func(query, top_k=2):
|
168 |
st.write(f"Search Query: {query}")
|
169 |
|
170 |
st.write("Document Header: ")
|
|
|
298 |
with st.spinner(
|
299 |
text="Embedding completed, searching for relevant text for given query and hits..."):
|
300 |
|
301 |
+
search_func(search_query,top_k)
|
302 |
|