Nitien commited on
Commit
cffe125
·
verified ·
1 Parent(s): 103f044

Update app.py

Browse files

corrected the indentation

Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -25,15 +25,16 @@ def get_weather(city:str)-> str: #it's import to specify the return type
25
  city : name of the city (string)
26
  returns: weather information of the City as string.
27
  """
28
- if not city or city.strip() == "":
29
- return "No Data Found"
30
 
31
- url_https = f"https://wttr.in/{city}?format=3"
32
- resp=requests.get(url_https)
33
- if resp.status() == 200:
34
- return resp
35
- else:
36
- return "No Data Found"
 
37
  @tool
38
  def get_current_time_in_timezone(timezone: str) -> str:
39
  """A tool that fetches the current local time in a specified timezone.
 
25
  city : name of the city (string)
26
  returns: weather information of the City as string.
27
  """
28
+ if not city or city.strip() == "":
29
+ return "No Data Found"
30
 
31
+ url_https = f"https://wttr.in/{city}?format=3"
32
+ resp=requests.get(url_https)
33
+ if resp.status() == 200:
34
+ return resp
35
+ else:
36
+ return "No Data Found"
37
+
38
  @tool
39
  def get_current_time_in_timezone(timezone: str) -> str:
40
  """A tool that fetches the current local time in a specified timezone.