Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,6 +80,9 @@ async def get_cached_file(url: str, subfolder: str, skip_on_startup: bool = Fals
|
|
| 80 |
# Raise error if essential and not in startup
|
| 81 |
raise RuntimeError(f"Failed to download {subfolder} file {url}: {e}") from e
|
| 82 |
|
|
|
|
|
|
|
|
|
|
| 83 |
# -----------------------------
|
| 84 |
# Preload all assets from Supabase at startup
|
| 85 |
# -----------------------------
|
|
|
|
| 80 |
# Raise error if essential and not in startup
|
| 81 |
raise RuntimeError(f"Failed to download {subfolder} file {url}: {e}") from e
|
| 82 |
|
| 83 |
+
async def download_to_cache(url: str, subfolder: str):
|
| 84 |
+
await get_cached_file(url, subfolder)
|
| 85 |
+
|
| 86 |
# -----------------------------
|
| 87 |
# Preload all assets from Supabase at startup
|
| 88 |
# -----------------------------
|