Spaces:
Runtime error
Runtime error
Commit
·
99e68e9
1
Parent(s):
a82dbac
Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ def crop_hail_jpg_filter(f, crop_coords, scaling_factor=255):
|
|
65 |
|
66 |
@st.cache_data
|
67 |
def get_data(start_date,end_date,crop_coords):
|
68 |
-
files = glob.glob(f'png
|
69 |
|
70 |
files_dates = np.array([int(f[-19:-11]) for f in files])
|
71 |
mask = np.where((files_dates >= int(start_date)) & (
|
@@ -174,7 +174,7 @@ def hex_to_rgba(hex_code, alpha=.8):
|
|
174 |
return rgba
|
175 |
|
176 |
|
177 |
-
bin_indices = np.digitize(
|
178 |
bin_colors = np.take(colors_values, bin_indices)
|
179 |
|
180 |
|
|
|
65 |
|
66 |
@st.cache_data
|
67 |
def get_data(start_date,end_date,crop_coords):
|
68 |
+
files = glob.glob(f'png/**/*.png', recursive=True)
|
69 |
|
70 |
files_dates = np.array([int(f[-19:-11]) for f in files])
|
71 |
mask = np.where((files_dates >= int(start_date)) & (
|
|
|
174 |
return rgba
|
175 |
|
176 |
|
177 |
+
bin_indices = np.digitize(max_values, bin_edges)-1
|
178 |
bin_colors = np.take(colors_values, bin_indices)
|
179 |
|
180 |
|