Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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']}"
|