ZainebS commited on
Commit
365b38a
·
verified ·
1 Parent(s): 4bd79e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -41,7 +41,8 @@ def get_weather(city:str,lat: float, lng:float)-> str:
41
  if response.status_code == 200:
42
  data = response.json()
43
  weather = data["current_weather"]
44
- return f"The weather in {city} is {weather['temperature']}°C - {weather_description[{weather['weathercode']}]}."
 
45
  else:
46
  return "Error fetching weather data."
47
 
 
41
  if response.status_code == 200:
42
  data = response.json()
43
  weather = data["current_weather"]
44
+ description = weather_descriptions[weather['weathercode']]
45
+ return f"The weather in {city} is {weather['temperature']}°C - {description}."
46
  else:
47
  return "Error fetching weather data."
48