Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,6 +28,13 @@ from Gradio_UI import GradioUI
|
|
| 28 |
@tool
|
| 29 |
def get_location_tool(ip: str): str
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
"""This is a tool that gets the exact location of a user including city, region, country, latitude, and longitude.
|
| 33 |
Args:
|
|
@@ -50,13 +57,7 @@ def get_location_tool(ip: str): str
|
|
| 50 |
|
| 51 |
Returns: ip address, city, region, country, and geo coordinates
|
| 52 |
"""
|
| 53 |
-
|
| 54 |
-
'city': response.city,
|
| 55 |
-
'region': response.region,
|
| 56 |
-
'country': response.country,
|
| 57 |
-
'latitude': response.latitude,
|
| 58 |
-
'longitude': response.longitude
|
| 59 |
-
}
|
| 60 |
response = DbIpCity.get(ip, api_key='free')
|
| 61 |
|
| 62 |
|
|
|
|
| 28 |
@tool
|
| 29 |
def get_location_tool(ip: str): str
|
| 30 |
|
| 31 |
+
return {
|
| 32 |
+
'city': response.city,
|
| 33 |
+
'region': response.region,
|
| 34 |
+
'country': response.country,
|
| 35 |
+
'latitude': response.latitude,
|
| 36 |
+
'longitude': response.longitude
|
| 37 |
+
}
|
| 38 |
|
| 39 |
"""This is a tool that gets the exact location of a user including city, region, country, latitude, and longitude.
|
| 40 |
Args:
|
|
|
|
| 57 |
|
| 58 |
Returns: ip address, city, region, country, and geo coordinates
|
| 59 |
"""
|
| 60 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
response = DbIpCity.get(ip, api_key='free')
|
| 62 |
|
| 63 |
|