Spaces:
Sleeping
Sleeping
Issue fixes
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def get_aqi(city:str, state:str, country:str)-> str:
|
|
50 |
|
51 |
response = requests.request("GET", url, headers=headers, data=payload)
|
52 |
|
53 |
-
data_json = response.json
|
54 |
if data_json.status == "success":
|
55 |
return f"The current air quality in {city} is {data_json.current.pollution.aqius}."
|
56 |
else:
|
|
|
50 |
|
51 |
response = requests.request("GET", url, headers=headers, data=payload)
|
52 |
|
53 |
+
data_json = response.json()
|
54 |
if data_json.status == "success":
|
55 |
return f"The current air quality in {city} is {data_json.current.pollution.aqius}."
|
56 |
else:
|