yourusername commited on
Commit
1e48515
·
1 Parent(s): e142b51

:construction: wip

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -22,11 +22,14 @@ def run_cmd(command):
22
  def download_cache(cache_dir: str, repo_name: str):
23
  """Clones a repo from HuggingFace Hub to a cache directory"""
24
  if os.environ.get("DO_DOWNLOAD_CACHE") and 'cache_is_downloaded' not in st.session_state:
25
- with st.spinner("Downloading cache..."):
26
  repo = Repository(local_dir=cache_dir, clone_from=repo_name, repo_type='dataset')
27
 
 
28
  while os.environ.get("GIT_LFS_PROGRESS"):
 
29
  time.sleep(1)
 
30
  # repo.git_pull() # Needed? What about if I'm running this locally + wanna update my local cache?
31
 
32
 
 
22
  def download_cache(cache_dir: str, repo_name: str):
23
  """Clones a repo from HuggingFace Hub to a cache directory"""
24
  if os.environ.get("DO_DOWNLOAD_CACHE") and 'cache_is_downloaded' not in st.session_state:
25
+ with st.spinner("Downloading cache...this might take a while 😬"):
26
  repo = Repository(local_dir=cache_dir, clone_from=repo_name, repo_type='dataset')
27
 
28
+ elapsed = 0
29
  while os.environ.get("GIT_LFS_PROGRESS"):
30
+ st.write("been waiting {elapsed} seconds...")
31
  time.sleep(1)
32
+ elapsed += 1
33
  # repo.git_pull() # Needed? What about if I'm running this locally + wanna update my local cache?
34
 
35