Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -200,7 +200,7 @@ async def download_file_from_url(url: str, retries: int = 3, delay: float = 2.0)
|
|
| 200 |
Returns the local file path. Reuses already downloaded files.
|
| 201 |
"""
|
| 202 |
if url in download_cache:
|
| 203 |
-
print(f"{url} is in download cache")
|
| 204 |
return download_cache[url]
|
| 205 |
|
| 206 |
# determine local file path in cache folder
|
|
@@ -209,7 +209,7 @@ async def download_file_from_url(url: str, retries: int = 3, delay: float = 2.0)
|
|
| 209 |
|
| 210 |
# check if file already exists on disk
|
| 211 |
if os.path.exists(local_path):
|
| 212 |
-
print(f"{url} is in disk and put to download cache now")
|
| 213 |
download_cache[url] = local_path
|
| 214 |
return local_path
|
| 215 |
|
|
@@ -225,7 +225,7 @@ async def download_file_from_url(url: str, retries: int = 3, delay: float = 2.0)
|
|
| 225 |
f.write(response.content)
|
| 226 |
|
| 227 |
download_cache[url] = local_path
|
| 228 |
-
print(f"{url} is downloaded from supabase and stored in disk and download cache now")
|
| 229 |
return local_path
|
| 230 |
|
| 231 |
except Exception as e:
|
|
|
|
| 200 |
Returns the local file path. Reuses already downloaded files.
|
| 201 |
"""
|
| 202 |
if url in download_cache:
|
| 203 |
+
#print(f"{url} is in download cache")
|
| 204 |
return download_cache[url]
|
| 205 |
|
| 206 |
# determine local file path in cache folder
|
|
|
|
| 209 |
|
| 210 |
# check if file already exists on disk
|
| 211 |
if os.path.exists(local_path):
|
| 212 |
+
#print(f"{url} is in disk and put to download cache now")
|
| 213 |
download_cache[url] = local_path
|
| 214 |
return local_path
|
| 215 |
|
|
|
|
| 225 |
f.write(response.content)
|
| 226 |
|
| 227 |
download_cache[url] = local_path
|
| 228 |
+
#print(f"{url} is downloaded from supabase and stored in disk and download cache now")
|
| 229 |
return local_path
|
| 230 |
|
| 231 |
except Exception as e:
|