lewispons commited on
Commit
480808c
1 Parent(s): 248ed64

Feat: Increase number of recommendatioons

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -144,7 +144,7 @@ if app_mode == "Generate Recomendations":
144
  cleaned_prompt = gensim_tokenizer(query)
145
 
146
  with st.spinner('Generating Recommendations ... '):
147
- results_df = get_recomendations_metadata(query=query, df=df, n=3, dictionary=dictionary, index=matrix, tfidf_model=model)
148
 
149
  ids = results_df['id'].to_list()
150
  titles = results_df['title'].to_list()
@@ -155,7 +155,7 @@ if app_mode == "Generate Recomendations":
155
 
156
  results = list(zip(ids, titles, authors, categories, abstracts, release_date))
157
 
158
- st.write("Your top 3 papers:")
159
  for result in results:
160
  with st.container():
161
  col1, col2 = st.columns([1,3])
@@ -169,11 +169,11 @@ if app_mode == "Generate Recomendations":
169
 
170
 
171
  with col2:
172
- st.write(f"Title: {result[1]}")
173
- st.write(f"Author: {result[2]}")
174
- st.write(f"Categories: {result[3]}")
175
- st.write(f"release_date: {result[5]}")
176
- st.write(f"Abstract: {result[4]}")
177
  st.markdown(f"""[Paper Link](https://arxiv.org/abs/{result[0]})""")
178
  st.divider()
179
  st.balloons()
 
144
  cleaned_prompt = gensim_tokenizer(query)
145
 
146
  with st.spinner('Generating Recommendations ... '):
147
+ results_df = get_recomendations_metadata(query=query, df=df, n=5, dictionary=dictionary, index=matrix, tfidf_model=model)
148
 
149
  ids = results_df['id'].to_list()
150
  titles = results_df['title'].to_list()
 
155
 
156
  results = list(zip(ids, titles, authors, categories, abstracts, release_date))
157
 
158
+ st.write("Your top 5 papers:")
159
  for result in results:
160
  with st.container():
161
  col1, col2 = st.columns([1,3])
 
169
 
170
 
171
  with col2:
172
+ st.write(f"{result[1]}")
173
+ st.write(f"{result[2]}")
174
+ st.write(f"{result[3]}")
175
+ st.write(f"{result[5]}")
176
+ st.write(f"{result[4]}")
177
  st.markdown(f"""[Paper Link](https://arxiv.org/abs/{result[0]})""")
178
  st.divider()
179
  st.balloons()