Da-Rabbit-Hole commited on
Commit
ce8e794
·
verified ·
1 Parent(s): e3cce84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -28,6 +28,13 @@ from Gradio_UI import GradioUI
28
  @tool
29
  def get_location_tool(ip: str): str
30
 
 
 
 
 
 
 
 
31
  """This is a tool that gets the exact location of a user including city, region, country, latitude, and longitude.
32
  Args:
33
  ip: A string representing a valid ip address (e.g., '192.168.10.1')
@@ -51,13 +58,7 @@ def get_location_tool(ip: str): str
51
  """
52
 
53
  response = DbIpCity.get(ip, api_key='free')
54
- return {
55
- 'city': response.city,
56
- 'region': response.region,
57
- 'country': response.country,
58
- 'latitude': response.latitude,
59
- 'longitude': response.longitude
60
- }
61
 
62
  ip_address = 'YOUR_IP_ADDRESS' # Replace with the actual IP address
63
  location = get_location(ip_address)
 
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
  """This is a tool that gets the exact location of a user including city, region, country, latitude, and longitude.
39
  Args:
40
  ip: A string representing a valid ip address (e.g., '192.168.10.1')
 
58
  """
59
 
60
  response = DbIpCity.get(ip, api_key='free')
61
+
 
 
 
 
 
 
62
 
63
  ip_address = 'YOUR_IP_ADDRESS' # Replace with the actual IP address
64
  location = get_location(ip_address)