pushpdeep commited on
Commit
0c81fea
1 Parent(s): 2ba7cb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -37,6 +37,12 @@ def main():
37
 
38
  # Filters
39
  st.sidebar.markdown("**Filters**")
 
 
 
 
 
 
40
  # filter_year = st.sidebar.slider("Publication year", 2010, 2021, (2010, 2021), 1)
41
  # filter_citations = st.sidebar.slider("Citations", 0, 250, 0)
42
  num_results = st.sidebar.slider("Number of search results", 10, 50, 10)
@@ -46,7 +52,7 @@ def main():
46
  # Get paper IDs
47
  D, I = vector_search([user_input], model, faiss_index, num_results)
48
  # Slice data on year
49
- frame = data
50
  # Get individual results
51
  i = 0
52
  for id_ in I.flatten().tolist():
 
37
 
38
  # Filters
39
  st.sidebar.markdown("**Filters**")
40
+ # List of available languages
41
+ languages = ['English', 'Hindi', 'Bengali', 'Marathi', 'Telugu', 'Tamil', 'Gujarati', 'Kannada', 'Odia', 'Malayalam', 'Panjabi', 'Assamese']
42
+
43
+ # Multiselect for choosing languages
44
+ selected_languages = st.multiselect('Select languages for search results', languages)
45
+
46
  # filter_year = st.sidebar.slider("Publication year", 2010, 2021, (2010, 2021), 1)
47
  # filter_citations = st.sidebar.slider("Citations", 0, 250, 0)
48
  num_results = st.sidebar.slider("Number of search results", 10, 50, 10)
 
52
  # Get paper IDs
53
  D, I = vector_search([user_input], model, faiss_index, num_results)
54
  # Slice data on year
55
+ frame = data[data['language'].isin(selected_languages)]
56
  # Get individual results
57
  i = 0
58
  for id_ in I.flatten().tolist():