Spaces:
Sleeping
Sleeping
Feat: Increase number of recommendatioons
Browse files
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=
|
| 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
|
| 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"
|
| 173 |
-
st.write(f"
|
| 174 |
-
st.write(f"
|
| 175 |
-
st.write(f"
|
| 176 |
-
st.write(f"
|
| 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()
|