om4r932 commited on
Commit
423e2c9
·
1 Parent(s): 0ce2aaa
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,7 +27,7 @@ async def search_academic_papers_arxiv(keyword: str, limit: int = 5) -> str:
27
  Search papers from arXiv database with specified keywords [optional: a limit of papers the user wants]
28
  Args: keyword: string, [optional: limit: integer, set limit to 5 if not specified]
29
  """
30
- response = await make_request("https://organizedprogrammers-arxiv.hf.space/search", {"keyword": keyword, "limit": limit})
31
  if not response:
32
  return "Unable to find papers | No papers has been found"
33
  return "\n".join([f"arXiv n°{paper_id} - {paper_meta['title']} by {paper_meta['authors']} : {paper_meta['abstract']}" for paper_id, paper_meta in response['message'].items()])
@@ -39,7 +39,7 @@ async def get_arxiv_pub_text(arxiv_id: str) -> str:
39
  Returns the full content of the publication
40
  Args: arxiv_id -> string
41
  """
42
- response = await make_request("https://organizedprogrammers-arxiv.hf.space/extract_pdf/arxiv_id", {"doc_id": arxiv_id})
43
  if not response:
44
  return "Unable to extract PDF | arXiv PDF not found"
45
  return response["message"]["text"]
 
27
  Search papers from arXiv database with specified keywords [optional: a limit of papers the user wants]
28
  Args: keyword: string, [optional: limit: integer, set limit to 5 if not specified]
29
  """
30
+ response = await make_request("https://organizedprogrammers-arxiv.hf.space/search", "POST", {"keyword": keyword, "limit": limit})
31
  if not response:
32
  return "Unable to find papers | No papers has been found"
33
  return "\n".join([f"arXiv n°{paper_id} - {paper_meta['title']} by {paper_meta['authors']} : {paper_meta['abstract']}" for paper_id, paper_meta in response['message'].items()])
 
39
  Returns the full content of the publication
40
  Args: arxiv_id -> string
41
  """
42
+ response = await make_request("https://organizedprogrammers-arxiv.hf.space/extract_pdf/arxiv_id", "POST", {"doc_id": arxiv_id})
43
  if not response:
44
  return "Unable to extract PDF | arXiv PDF not found"
45
  return response["message"]["text"]