egarciag commited on
Commit
cf5568c
·
verified ·
1 Parent(s): 8ab983b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -12,16 +12,21 @@ from Gradio_UI import GradioUI
12
  @tool
13
  def search_articles(text2search: str, start: int, end: int, output_md: str = "arxiv_articles.md") -> str:
14
  """
15
- A tool that searches articles on arxiv.org using a search term and saves the results as a Markdown file.
 
16
 
17
  Args:
18
- text2search (str): Search query to filter articles.
19
- start (int): Number of articles to skip.
20
- end (int): Max results.
21
- output_md (str): Path to save the Markdown file. Default is 'arxiv_articles.md'.
22
 
23
  Returns:
24
- str: Path to the generated Markdown file.
 
 
 
 
25
  """
26
  try:
27
  # Construct the ArXiv API query
 
12
  @tool
13
  def search_articles(text2search: str, start: int, end: int, output_md: str = "arxiv_articles.md") -> str:
14
  """
15
+ A tool that searches for academic articles on arxiv.org using a search term and saves the results
16
+ as a Markdown file.
17
 
18
  Args:
19
+ text2search (str): The keyword or phrase to search for in ArXiv articles.
20
+ start (int): The starting index of the search results (used for pagination).
21
+ end (int): The maximum number of articles to retrieve.
22
+ output_md (str, optional): The name of the output Markdown file. Defaults to "arxiv_articles.md".
23
 
24
  Returns:
25
+ str: The absolute path of the generated Markdown file, or an error message if the request fails.
26
+
27
+ Example:
28
+ >>> search_articles("deep learning", 0, 10)
29
+ "Markdown file created: /absolute/path/to/arxiv_articles.md"
30
  """
31
  try:
32
  # Construct the ArXiv API query