TLeonidas commited on
Commit
60d53f2
·
verified ·
1 Parent(s): 64c2ffd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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/history?lat={latitude}&lon={longitude}&start=1614556800&end=1614643200&appid=78b94879cbb50e02397e93687aa24adc"
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()