Commit
•
1ee33b8
1
Parent(s):
38c818a
increase returned papers to 7
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def get_recommendations_from_semantic_scholar(semantic_scholar_id: str):
|
|
43 |
json={
|
44 |
"positivePaperIds": [semantic_scholar_id],
|
45 |
},
|
46 |
-
params={"fields": "externalIds,title,year", "limit":
|
47 |
)
|
48 |
return r.json()["recommendedPapers"]
|
49 |
except KeyError as e:
|
@@ -53,7 +53,7 @@ def get_recommendations_from_semantic_scholar(semantic_scholar_id: str):
|
|
53 |
) from e
|
54 |
|
55 |
|
56 |
-
def filter_recommendations(recommendations, max_paper_count=
|
57 |
# include only arxiv papers
|
58 |
arxiv_paper = [
|
59 |
r for r in recommendations if r["externalIds"].get("ArXiv", None) is not None
|
|
|
43 |
json={
|
44 |
"positivePaperIds": [semantic_scholar_id],
|
45 |
},
|
46 |
+
params={"fields": "externalIds,title,year", "limit": 14},
|
47 |
)
|
48 |
return r.json()["recommendedPapers"]
|
49 |
except KeyError as e:
|
|
|
53 |
) from e
|
54 |
|
55 |
|
56 |
+
def filter_recommendations(recommendations, max_paper_count=7):
|
57 |
# include only arxiv papers
|
58 |
arxiv_paper = [
|
59 |
r for r in recommendations if r["externalIds"].get("ArXiv", None) is not None
|