Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def get_weather(city: str) -> str:
|
|
39 |
city: A string representing a valid city (e.g., 'Bangalore').
|
40 |
"""
|
41 |
try:
|
42 |
-
requests.get('https://api.weatherapi.com/v1/current.json?key=41d95dfc59fb499583443528250902&q=' + city + '&aqi=no')
|
43 |
weatherJSON = response.json()
|
44 |
cityName = weatherJSON.get('location').get('name')
|
45 |
cityTemp = weatherJSON.get('current').get('temp_c')
|
|
|
39 |
city: A string representing a valid city (e.g., 'Bangalore').
|
40 |
"""
|
41 |
try:
|
42 |
+
response = requests.get('https://api.weatherapi.com/v1/current.json?key=41d95dfc59fb499583443528250902&q=' + city + '&aqi=no')
|
43 |
weatherJSON = response.json()
|
44 |
cityName = weatherJSON.get('location').get('name')
|
45 |
cityTemp = weatherJSON.get('current').get('temp_c')
|