asghani commited on
Commit
76e6d7a
·
verified ·
1 Parent(s): 382dead

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -66,7 +66,7 @@ def fetch_weather_and_aqi_for_area(city, area):
66
  return f"Error fetching AQI: {aqi_response.text}"
67
 
68
  aqi_data = aqi_response.json()
69
- aqi_value = aqi_data["list"][0]["main"]["aqi"]
70
 
71
  return weather_details, aqi_value
72
 
 
66
  return f"Error fetching AQI: {aqi_response.text}"
67
 
68
  aqi_data = aqi_response.json()
69
+ aqi_value = aqi_data["list"][0]["components"]["pm2_5"]
70
 
71
  return weather_details, aqi_value
72