nickmuchi commited on
Commit
0c850db
·
1 Parent(s): 7580e3c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -173,7 +173,19 @@ def display_df_as_table(model,top_k,score):
173
  df['Score'] = round(df['Score'],2)
174
 
175
  return df
 
 
176
 
 
 
 
 
 
 
 
 
 
 
177
  # This function will search all wikipedia articles for passages that
178
  # answer the query
179
  def search_func(query, top_k=top_k):
@@ -229,18 +241,6 @@ def search_func(query, top_k=top_k):
229
 
230
  rerank_df = display_df_as_table(hits,top_k,'cross-score')
231
  st.write(rerank_df.to_html(index=False), unsafe_allow_html=True)
232
-
233
- #Streamlit App
234
-
235
- st.title("Semantic Search with Retrieve & Rerank 📝")
236
-
237
- window_size = st.sidebar.slider("Paragraph Window Size",min_value=1,max_value=10,value=3)
238
-
239
- bi_encoder_type = st.sidebar.selectbox(
240
- "Bi-Encoder", options=bi_enc_options
241
- )
242
-
243
- top_k = st.sidebar.slider("Number of Top Hits Generated",min_value=1,max_value=5,value=2)
244
 
245
  st.markdown(
246
  """
 
173
  df['Score'] = round(df['Score'],2)
174
 
175
  return df
176
+
177
+ #Streamlit App
178
 
179
+ st.title("Semantic Search with Retrieve & Rerank 📝")
180
+
181
+ window_size = st.sidebar.slider("Paragraph Window Size",min_value=1,max_value=10,value=3)
182
+
183
+ bi_encoder_type = st.sidebar.selectbox(
184
+ "Bi-Encoder", options=bi_enc_options
185
+ )
186
+
187
+ top_k = st.sidebar.slider("Number of Top Hits Generated",min_value=1,max_value=5,value=2)
188
+
189
  # This function will search all wikipedia articles for passages that
190
  # answer the query
191
  def search_func(query, top_k=top_k):
 
241
 
242
  rerank_df = display_df_as_table(hits,top_k,'cross-score')
243
  st.write(rerank_df.to_html(index=False), unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
244
 
245
  st.markdown(
246
  """