pdx97 commited on
Commit
2ba57f4
·
verified ·
1 Parent(s): 91e81c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -331,18 +331,21 @@ def fetch_latest_arxiv_papers(keywords: list, num_results: int = 5) -> list:
331
  Fetches and ranks research papers from ArXiv using TF-IDF and Cosine Similarity.
332
 
333
  Args:
334
- keywords (list): A list of keywords for search.
335
- num_results (int): Number of results to return (default = 5).
336
 
337
  Returns:
338
- list: A list of dictionaries containing:
339
  - "title" (str): The title of the paper.
340
  - "authors" (str): The authors of the paper.
341
  - "year" (str): The year of publication.
342
  - "abstract" (str): A summary of the paper.
343
  - "link" (str): A URL to the full paper.
 
 
344
  """
345
 
 
346
  try:
347
  # ✅ Construct the query for ArXiv API
348
  query = "+AND+".join([f"all:{kw}" for kw in keywords])
 
331
  Fetches and ranks research papers from ArXiv using TF-IDF and Cosine Similarity.
332
 
333
  Args:
334
+ keywords (list[str]): A list of keywords to search for relevant research papers.
335
+ num_results (int): The number of top-ranked papers to return. Defaults to 5.
336
 
337
  Returns:
338
+ list[dict]: A list of dictionaries containing:
339
  - "title" (str): The title of the paper.
340
  - "authors" (str): The authors of the paper.
341
  - "year" (str): The year of publication.
342
  - "abstract" (str): A summary of the paper.
343
  - "link" (str): A URL to the full paper.
344
+ - "citations" (int): The citation count of the paper.
345
+ - "summary" (str): A GPT-generated summary of the abstract.
346
  """
347
 
348
+
349
  try:
350
  # ✅ Construct the query for ArXiv API
351
  query = "+AND+".join([f"all:{kw}" for kw in keywords])