MariaKaiser commited on
Commit
9f623e9
·
verified ·
1 Parent(s): 4ec35b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -200,6 +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
  return download_cache[url]
204
 
205
  # determine local file path in cache folder
@@ -208,6 +209,7 @@ async def download_file_from_url(url: str, retries: int = 3, delay: float = 2.0)
208
 
209
  # check if file already exists on disk
210
  if os.path.exists(local_path):
 
211
  download_cache[url] = local_path
212
  return local_path
213
 
@@ -223,6 +225,7 @@ async def download_file_from_url(url: str, retries: int = 3, delay: float = 2.0)
223
  f.write(response.content)
224
 
225
  download_cache[url] = local_path
 
226
  return local_path
227
 
228
  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: