mettaleb15 commited on
Commit
8936dd1
·
verified ·
1 Parent(s): c3657dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -8,19 +8,20 @@ from tools.final_answer import FinalAnswerTool
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 get_latitude_from_address(address: str) -> str:
13
- """Récupère la latitude (et longitude) correspondant à une adresse postale donnée.
14
 
15
- Arguments:
16
- address (str): L'adresse complète à géocoder (ex: '10 Downing Street, London' ou 'Tour Eiffel, Paris').
17
 
18
- Retour:
19
  str: Une chaîne contenant la latitude et la longitude correspondantes.
20
  """
21
- try:
22
- import requests
23
 
 
24
  url = "https://nominatim.openstreetmap.org/search"
25
  params = {"q": address, "format": "json", "limit": 1}
26
  headers = {"User-Agent": "smolagents-geocoder/1.0"}
 
8
  from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
+
12
  @tool
13
  def get_latitude_from_address(address: str) -> str:
14
+ """Récupère la latitude et la longitude d'une adresse.
15
 
16
+ Args:
17
+ address (str): L'adresse complète à géocoder (ex: '10 Downing Street, London').
18
 
19
+ Returns:
20
  str: Une chaîne contenant la latitude et la longitude correspondantes.
21
  """
22
+ import requests
 
23
 
24
+ try:
25
  url = "https://nominatim.openstreetmap.org/search"
26
  params = {"q": address, "format": "json", "limit": 1}
27
  headers = {"User-Agent": "smolagents-geocoder/1.0"}