lathashree01 commited on
Commit
5ffedaa
·
verified ·
1 Parent(s): cd6a167

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -30,8 +30,9 @@ def get_weather(location:str,)-> dict: #it's import to specify the return type
30
  "temperature": data["main"]["temp"],
31
  "weather": data["weather"][0]["description"]
32
  }
33
- else:
34
- return {"error": "Could not fetch weather data"}
 
35
  @tool
36
  def get_current_time_in_timezone(timezone: str) -> str:
37
  """A tool that fetches the current local time in a specified timezone.
 
30
  "temperature": data["main"]["temp"],
31
  "weather": data["weather"][0]["description"]
32
  }
33
+ else:
34
+ return {"error": "Could not fetch weather data"}
35
+
36
  @tool
37
  def get_current_time_in_timezone(timezone: str) -> str:
38
  """A tool that fetches the current local time in a specified timezone.