Update app.py
Browse files
app.py
CHANGED
@@ -19,18 +19,6 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
19 |
"""
|
20 |
return "What magic will you build ?"
|
21 |
|
22 |
-
@tool
|
23 |
-
def get_weather(city: str)-> str:
|
24 |
-
url = f"https://www.weather.com/weather/today/l/{city}"
|
25 |
-
response = requests.get(url)
|
26 |
-
soup = BeautifulSoup(response.content, 'html.parser')
|
27 |
-
weather_info = soup.find('span', class_='CurrentConditions--tempValue--3KcTQ').text
|
28 |
-
return weather_info
|
29 |
-
|
30 |
-
# Get weather data for Paris
|
31 |
-
weather_data = get_weather("Paris")
|
32 |
-
print(weather_data)
|
33 |
-
|
34 |
@tool
|
35 |
def get_current_time_in_timezone(timezone: str) -> str:
|
36 |
"""A tool that fetches the current local time in a specified timezone.
|
|
|
19 |
"""
|
20 |
return "What magic will you build ?"
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
@tool
|
23 |
def get_current_time_in_timezone(timezone: str) -> str:
|
24 |
"""A tool that fetches the current local time in a specified timezone.
|