subham73 commited on
Commit
ba52eff
·
verified ·
1 Parent(s): b5315fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -18,6 +18,7 @@ def current_weather(loction: str)-> str:
18
 
19
  key = "4da8241f3e302b39314e95cf04d4552e"
20
  url = f"https://api.weatherstack.com/current?access_key={key}"
 
21
  response = requests.get(url, params=query)
22
  data = response.json()
23
  return f"Weather of {location} is {data['current']['weather_descriptions']} with the temperature {data['current']['temperature']}"
 
18
 
19
  key = "4da8241f3e302b39314e95cf04d4552e"
20
  url = f"https://api.weatherstack.com/current?access_key={key}"
21
+ query = {"query": loction}
22
  response = requests.get(url, params=query)
23
  data = response.json()
24
  return f"Weather of {location} is {data['current']['weather_descriptions']} with the temperature {data['current']['temperature']}"