Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def get_coordinates(location):
|
|
15 |
|
16 |
# Function to get AQI value from OpenWeatherMap API
|
17 |
def get_aqi(latitude, longitude, api_key):
|
18 |
-
url = f"http://api.openweathermap.org/data/2.5/air_pollution
|
19 |
return aqi_value
|
20 |
|
21 |
# Function to make prediction
|
@@ -30,5 +30,5 @@ iface = gr.Interface(fn=predict_air_quality,
|
|
30 |
inputs=["text", "text"],
|
31 |
outputs="text",
|
32 |
title="Air Quality Prediction",
|
33 |
-
description="Enter location:")
|
34 |
iface.launch()
|
|
|
15 |
|
16 |
# Function to get AQI value from OpenWeatherMap API
|
17 |
def get_aqi(latitude, longitude, api_key):
|
18 |
+
url = f"http://api.openweathermap.org/data/2.5/air_pollution?lat={latitude}&lon={longitude}&appid={api_key}"
|
19 |
return aqi_value
|
20 |
|
21 |
# Function to make prediction
|
|
|
30 |
inputs=["text", "text"],
|
31 |
outputs="text",
|
32 |
title="Air Quality Prediction",
|
33 |
+
description="Enter location and OpenWeatherMap API key:")
|
34 |
iface.launch()
|