Spaces:
Sleeping
Sleeping
ekhatskevich
commited on
Commit
·
0daa221
1
Parent(s):
eebcf01
fix: add hint for address request
Browse files- app.py +1 -1
- prompts.yaml +1 -0
app.py
CHANGED
@@ -11,7 +11,7 @@ from Gradio_UI import GradioUI
|
|
11 |
def show_internet_location(public_ip)-> str:
|
12 |
"""A tool that shows location based on IP address.
|
13 |
Args:
|
14 |
-
public_ip: IP address
|
15 |
"""
|
16 |
try:
|
17 |
reader = geoip2.database.Reader('geo_cities/GeoLite2-City.mmdb')
|
|
|
11 |
def show_internet_location(public_ip)-> str:
|
12 |
"""A tool that shows location based on IP address.
|
13 |
Args:
|
14 |
+
public_ip: IP address from user request
|
15 |
"""
|
16 |
try:
|
17 |
reader = geoip2.database.Reader('geo_cities/GeoLite2-City.mmdb')
|
prompts.yaml
CHANGED
@@ -44,6 +44,7 @@
|
|
44 |
Thought: I will use python code to retrieve the location based on IP address provided in the request and then return the final answer using the `final_answer` tool
|
45 |
Code:
|
46 |
```py
|
|
|
47 |
result = show_internet_location(public_ip)
|
48 |
final_answer(result)
|
49 |
```<end_code>
|
|
|
44 |
Thought: I will use python code to retrieve the location based on IP address provided in the request and then return the final answer using the `final_answer` tool
|
45 |
Code:
|
46 |
```py
|
47 |
+
public_ip = 8.8.8.8
|
48 |
result = show_internet_location(public_ip)
|
49 |
final_answer(result)
|
50 |
```<end_code>
|