Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -124,7 +124,7 @@ import panel as pn
|
|
| 124 |
import param
|
| 125 |
import xarray as xr
|
| 126 |
|
| 127 |
-
@pn.cache(max_items=32,policy='LRU')
|
| 128 |
def load_csv(url):
|
| 129 |
fs = fsspec.filesystem("https")
|
| 130 |
with fs.open(url) as f:
|
|
@@ -132,12 +132,12 @@ def load_csv(url):
|
|
| 132 |
df.sort_values(by="year") #inplace=True)
|
| 133 |
return df
|
| 134 |
|
| 135 |
-
@pn.cache(max_items=4,policy='LRU')
|
| 136 |
def load_bathymetry(url):
|
| 137 |
fs = fsspec.filesystem("https")
|
| 138 |
return xr.open_dataset(fs.open(url), decode_times=False, use_cftime=True)
|
| 139 |
|
| 140 |
-
@pn.cache(max_items=16,policy='LRU')
|
| 141 |
def load_netCDF(file_path):
|
| 142 |
fs = fsspec.filesystem("https")
|
| 143 |
ds= ds = (
|
|
@@ -550,4 +550,4 @@ sidebar = [
|
|
| 550 |
template = pn.template.FastListTemplate(
|
| 551 |
title="SADCP data Viewer", sidebar=sidebar, main=[tabs]
|
| 552 |
)
|
| 553 |
-
template.
|
|
|
|
| 124 |
import param
|
| 125 |
import xarray as xr
|
| 126 |
|
| 127 |
+
@pn.cache(max_items=32,policy='LRU',per_session=True)
|
| 128 |
def load_csv(url):
|
| 129 |
fs = fsspec.filesystem("https")
|
| 130 |
with fs.open(url) as f:
|
|
|
|
| 132 |
df.sort_values(by="year") #inplace=True)
|
| 133 |
return df
|
| 134 |
|
| 135 |
+
@pn.cache(max_items=4,policy='LRU',per_session=True)
|
| 136 |
def load_bathymetry(url):
|
| 137 |
fs = fsspec.filesystem("https")
|
| 138 |
return xr.open_dataset(fs.open(url), decode_times=False, use_cftime=True)
|
| 139 |
|
| 140 |
+
@pn.cache(max_items=16,policy='LRU',per_session=True)
|
| 141 |
def load_netCDF(file_path):
|
| 142 |
fs = fsspec.filesystem("https")
|
| 143 |
ds= ds = (
|
|
|
|
| 550 |
template = pn.template.FastListTemplate(
|
| 551 |
title="SADCP data Viewer", sidebar=sidebar, main=[tabs]
|
| 552 |
)
|
| 553 |
+
template.servable()
|