ahmedess0 commited on
Commit
ab529ab
·
verified ·
1 Parent(s): 88de546

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -9,18 +9,17 @@ from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
- def search_arxiv(query: str, max_results: int = 5) -> str:
13
  """Searches arXiv for academic papers.
14
 
15
  Args:
16
- max_results (int, optional): The maximum number of papers to retrieve. Defaults to 5.
17
  query (str): The topic or keywords to search for.
18
 
19
 
20
  Returns:
21
  str: A formatted list of found papers with titles, summaries, and links.
22
  """
23
- url = f"http://export.arxiv.org/api/query?search_query={query}&max_results={max_results}"
24
  response = requests.get(url)
25
 
26
  if response.status_code == 200:
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
+ def search_arxiv(query: str) -> str:
13
  """Searches arXiv for academic papers.
14
 
15
  Args:
 
16
  query (str): The topic or keywords to search for.
17
 
18
 
19
  Returns:
20
  str: A formatted list of found papers with titles, summaries, and links.
21
  """
22
+ url = f"http://export.arxiv.org/api/query?search_query={query}&max_results=5"
23
  response = requests.get(url)
24
 
25
  if response.status_code == 200: