LiamKhoaLe commited on
Commit
0bb2ccf
·
1 Parent(s): a077f52

Migrate model debug on app

Browse files
Files changed (1) hide show
  1. download_model.py +1 -1
download_model.py CHANGED
@@ -12,12 +12,12 @@ model_path = snapshot_download(repo_id=MODEL_REPO, cache_dir=MODEL_CACHE_DIR)
12
  # Find the correct snapshot directory
13
  # snapshots_dir = os.path.join(model_path, "snapshots")
14
  snapshots_dir = model_path
 
15
  if os.path.exists(snapshots_dir):
16
  snapshot_folders = os.listdir(snapshots_dir)
17
  if snapshot_folders:
18
  snapshot_dir = os.path.join(snapshots_dir, snapshot_folders[0]) # Get first snapshot folder
19
  print(f"📂 Moving model files from {snapshot_dir} to {MODEL_CACHE_DIR}...")
20
-
21
  # Move all model files (including subdirectories)
22
  for item in os.listdir(snapshot_dir):
23
  source_path = os.path.join(snapshot_dir, item)
 
12
  # Find the correct snapshot directory
13
  # snapshots_dir = os.path.join(model_path, "snapshots")
14
  snapshots_dir = model_path
15
+ print("Model path: ", snapshots_dir)
16
  if os.path.exists(snapshots_dir):
17
  snapshot_folders = os.listdir(snapshots_dir)
18
  if snapshot_folders:
19
  snapshot_dir = os.path.join(snapshots_dir, snapshot_folders[0]) # Get first snapshot folder
20
  print(f"📂 Moving model files from {snapshot_dir} to {MODEL_CACHE_DIR}...")
 
21
  # Move all model files (including subdirectories)
22
  for item in os.listdir(snapshot_dir):
23
  source_path = os.path.join(snapshot_dir, item)