Chmonya1 commited on
Commit
9823b9a
·
verified ·
1 Parent(s): fd32a0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -9,9 +9,8 @@ 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 my_custom_tool(str1:str, api_key:str)-> str: #it's import to specify the return type
13
- #Keep this format for the description / args / args description but feel free to modify the tool
14
- """
15
  A tool that performs a search in the PubMed database using the NCBI E-utilities API.
16
 
17
  This tool sends a request to the PubMed database with a specified search term and returns
@@ -34,11 +33,11 @@ def my_custom_tool(str1:str, api_key:str)-> str: #it's import to specify the ret
34
  params = {
35
  "db": "pubmed",
36
  "term": str1,
37
- "retmax": 5, # Ограничение количества результатов
38
- "api_key": api_key # Необязательно, но рекомендуется
39
  }
40
 
41
- # Отправка запроса
42
  response = requests.get(base_url, params=params)
43
  return response.text
44
 
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
+ def my_custom_tool(str1: str, api_key: str) -> str:
13
+ """
 
14
  A tool that performs a search in the PubMed database using the NCBI E-utilities API.
15
 
16
  This tool sends a request to the PubMed database with a specified search term and returns
 
33
  params = {
34
  "db": "pubmed",
35
  "term": str1,
36
+ "retmax": 5, # Limit the number of results
37
+ "api_key": api_key # API key for authentication
38
  }
39
 
40
+ # Send the request
41
  response = requests.get(base_url, params=params)
42
  return response.text
43