Spaces:
Running
Running
souvik0306
commited on
Commit
·
1dc4478
1
Parent(s):
fc1c760
Update requirements.txt: Remove functools32 package and add folium
Browse files- requirements.txt +0 -1
- weather.py +0 -2
requirements.txt
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
numpy
|
2 |
pandas
|
3 |
geopy
|
4 |
-
functools32
|
5 |
folium
|
6 |
requests
|
|
|
1 |
numpy
|
2 |
pandas
|
3 |
geopy
|
|
|
4 |
folium
|
5 |
requests
|
weather.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import requests
|
2 |
import itertools
|
3 |
from geopy.distance import geodesic
|
4 |
-
from functools import lru_cache
|
5 |
|
6 |
# Replace with your OpenWeather API key
|
7 |
API_KEY = '9811dd1481209c64fba6cb2c90f27140'
|
@@ -19,7 +18,6 @@ def get_intermediate_points(start, end, num_points=4):
|
|
19 |
return points
|
20 |
|
21 |
# Fetch weather data for a given coordinate
|
22 |
-
@lru_cache(maxsize=128)
|
23 |
def fetch_weather(lat, lon):
|
24 |
url = f'http://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={API_KEY}&units=metric'
|
25 |
response = requests.get(url)
|
|
|
1 |
import requests
|
2 |
import itertools
|
3 |
from geopy.distance import geodesic
|
|
|
4 |
|
5 |
# Replace with your OpenWeather API key
|
6 |
API_KEY = '9811dd1481209c64fba6cb2c90f27140'
|
|
|
18 |
return points
|
19 |
|
20 |
# Fetch weather data for a given coordinate
|
|
|
21 |
def fetch_weather(lat, lon):
|
22 |
url = f'http://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={API_KEY}&units=metric'
|
23 |
response = requests.get(url)
|