Spaces:
Sleeping
Sleeping
update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
37 |
|
38 |
|
39 |
@tool
|
40 |
-
def get_city_id(
|
41 |
"""A tool that get city ID from city name.
|
42 |
|
43 |
Args:
|
@@ -51,7 +51,7 @@ def get_city_id(url, city_name):
|
|
51 |
xml_url = "https://weather.tsukumijima.net/primary_area.xml"
|
52 |
|
53 |
try:
|
54 |
-
response = requests.get(
|
55 |
response.raise_for_status()
|
56 |
response.encoding = response.apparent_encoding
|
57 |
xml_string = response.text
|
|
|
37 |
|
38 |
|
39 |
@tool
|
40 |
+
def get_city_id(city_name):
|
41 |
"""A tool that get city ID from city name.
|
42 |
|
43 |
Args:
|
|
|
51 |
xml_url = "https://weather.tsukumijima.net/primary_area.xml"
|
52 |
|
53 |
try:
|
54 |
+
response = requests.get(xml_url)
|
55 |
response.raise_for_status()
|
56 |
response.encoding = response.apparent_encoding
|
57 |
xml_string = response.text
|